How to get profile values in PHP block

Hello,

 

How can I get users Country in PHP block on Profile page.

 

Thanks,

Quote · 4 Jan 2013

 

Hello,

 

How can I get users Country in PHP block on Profile page.

 

Thanks,

 
I am assuming you want the country of the member whos profile is being viewed and not the logged in members country.

$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sCountry = $aUserData['Country'];
echo $sCountry;

https://www.deanbassett.com
Quote · 4 Jan 2013

And if you want the full country name instead of the two letter country code then use this instead.

$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sCountry = $aUserData['Country'];
$sFullCountryName = _t(db_value("SELECT `LKey` FROM `sys_pre_values` WHERE `Key`='Country' AND `Value`='$sCountry'"));
echo $sFullCountryName;

https://www.deanbassett.com
Quote · 4 Jan 2013

Thank you for your help!

Quote · 5 Jan 2013

 

And if you want the full country name instead of the two letter country code then use this instead.

$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sCountry = $aUserData['Country'];
$sFullCountryName = _t(db_value("SELECT `LKey` FROM `sys_pre_values` WHERE `Key`='Country' AND `Value`='$sCountry'"));
echo $sFullCountryName;

 

Hi, deano92964.
Can you please tell how to make a NickName?

Quote · 20 Jul 2013

Nickname is even easier.

You could use this.

$profileID = getID($_GET['ID']);
$aUserData = getProfileInfo($profileID);
$sNickName= $aUserData['NickName'];
echo $sNickName;

But dolphin already has a function built in for that.

For dolphin 7.1 it's just one line of code for the nickname.

echo getUsername();

https://www.deanbassett.com
Quote · 20 Jul 2013

thank you very much!

Quote · 20 Jul 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.