By Aikaterini Koutsouflaki on Saturday, 26 May 2018
Posted in Technical Issues
Likes 0
Views 650
Votes 0
Hello
We managed to get the Name of the user following instructions found in documentation.

We got it using...
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$my = ES::user();
echo $my->getName();

How will we get the user ID to echo it somewhere?

Thank you!
As long as you call this ES::user() user library, it will return you the whole user object which included the user id as well.

So you can use this following code to get user id or name :


echo $my->id;
echo $my->name;
echo $my->username;
echo $my->email;


Hope this will help.
·
Saturday, 26 May 2018 09:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes this works... thank you!
·
Saturday, 26 May 2018 11:41
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding
·
Saturday, 26 May 2018 11:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post