Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Get groups and events of user

10 years 6 months ago
Licenses:
JomSocial Expired

Hi,

is ist possible to get all groups and events of a user inside of my component?
I couldn´t find anything about this in the documentation.

I tried CFactory::getRequestUser()->groups, but it´s an empty array although I´ve created a group.

10 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

- for group you should use this code :

$groupsModel = CFactory::getModel('groups');
$members = $groupsModel->getMembers($groupID, 0, true, false, SHOW_GROUP_ADMIN);

- for event you should use this code :
 $event = JTable::getInstance('Event', 'CTable');
            $event->load($eventID);
$members = $event->getMembers(COMMUNITY_EVENT_STATUS_ATTEND, 0, false, true);

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW