All,
I am looking for a way to pull the information from FEU to build a query on the database. I have had no issues using the tag {$ccuser->property('propertyname')} on a page or in a template. However I want to be able to get the information using a "User defined tag". Is there a library or refercene that I can use to assign these values to PHP varabiles and query the databse?
I would like to do something to the effect of:
property('FName');
$query = "SELECT * FROM TABLE WHERE FNAME = '" . $firstName . "'";
?>
Thanks,
Nick
[SOLVED]Getting a User's Properties through the User Defined Tag
[SOLVED]Getting a User's Properties through the User Defined Tag
Last edited by njmeyer on Thu May 14, 2009 2:43 pm, edited 1 time in total.
Re: Getting a User's Properties through the User Defined Tag
try..
global $gCms;
$feusers = &$gCms->modules['FrontEndUsers']['object'];
so you couuld call like this...
$uid = $feusers->LoggedInID();
cheers
jeremyBass
global $gCms;
$feusers = &$gCms->modules['FrontEndUsers']['object'];
so you couuld call like this...
$uid = $feusers->LoggedInID();
cheers
jeremyBass
Re: Getting a User's Properties through the User Defined Tag
Awesome!! that is half of the answer I am looking for. Now how do I get the properties from the $uid?
Thanks,
njmeyer
Thanks,
njmeyer
Re: Getting a User's Properties through the User Defined Tag
I figured it out and just used :
$feusers->GetUserPropertyFull('Fname', $uid);
$feusers->GetUserPropertyFull('Fname', $uid);