By Valentin Barbu on Friday, 20 June 2014
Replies 2
Likes 0
Views 674
Votes 0
Hello guys,

Can you help me with a sample of code which allows me to display something in my easysocial custom template, just for a specific easysocial profile type/usergroup ?

Regards
Oky Mark gave me a hint here, and I solved what i need, in case someone else may need:

$my = Foundry::user();
var_dump($my->getUserGroups());

Rgds
·
Friday, 20 June 2014 21:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Barbu Anyway this would give you guys a better idea of some of the APIs we have,


<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');

// This retrieves the current logged in user.
$my = Foundry::user();

// This retrieves a specific user account
$id = 62;
$user = Foundry::user($id);

// This retrieves the Joomla user group the user belongs to
$user->getUserGroups();

// This retrieves the profile the user belongs to
$user->getProfile();


Hope this helps!
·
Saturday, 21 June 2014 00:37
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post