Page 1 of 1

[SOLVED]how to retrieve propertie of FEU

Posted: Thu Nov 03, 2011 2:37 pm
by tyty
Hi all
I use module frontend user and i need to retrieve some properties like surname, name.
Is there a way to retrieve them after user connection.

i tried custom content but i just found a smarty tag to retrieve username (email by default)

I didn't see anything about that
Thank you for your help

Re: how to retrieve propertie of FEU

Posted: Sat Nov 05, 2011 4:57 am
by Dr.CSS
You need to explain what you mean by retrieve...

more info = more help...

Re: how to retrieve propertie of FEU

Posted: Sat Nov 05, 2011 7:42 am
by tyty
hello

i'm working on a reservation module for my crossfit box
idea it's when a user is logged he can reserve a course
in this time i use a form with 2 inputs name and surname
But it will be more simple if i can recover some user properties from FEU

thanks for you help

Re: how to retrieve propertie of FEU

Posted: Sat Nov 05, 2011 12:26 pm
by mcDavid
Take a look at the FrontEndUsers.api.php file in the FrontEndUsers module. It contains a lot of functions you can use in your module. You can probably guess how they work by looking at the function names and the variables they use. You'll probably need GetUserPropertyFull().

Re: how to retrieve propertie of FEU

Posted: Sat Nov 05, 2011 1:39 pm
by spcherub
Also look in the FEU Help Section:

Code: Select all

{$feu_smarty->get_user_properties($uid,$assign)}
This function can be used to extract a list of properties for the specified user and assign them to a smarty variable with the specified name.

Example:
{$feu_smarty->get_user_properties(5,'userprops')}
{$userprops|@print_r}

[SOLVED]how to retrieve propertie of FEU

Posted: Sun Nov 06, 2011 7:31 am
by tyty
i will take a look on this file and smarty tag
thank you for the help

Re: how to retrieve propertie of FEU

Posted: Sun Nov 06, 2011 2:05 pm
by spcherub
Also if you use the {FrontEndUser} tag in your template or page, it exports all the custom fields as smarty variables. So if you have you first and surname fields defined as fname and sname, you will find you can use {$fname} and {$sname} in your template/page - As long as you have the {FrontEndUser} tag inserted above. This is your simplest option.

Re: how to retrieve propertie of FEU

Posted: Sun Nov 06, 2011 6:50 pm
by tyty
hi
{$feu_smarty->get_user_properties($uid,'name')}

it work's thank you