I want to fetch the group data (primary and secondary group ids) of a single user. I am using the IPSMember Class in order to load a user and I thought I would be able to access those attributes directly then. This is what I have tried to echo all group ids of a specific user:
$username = "trial";
$member = IPSMember::load($username, 'all', 'username');
$primaryGroups = $member['member_group_id'];
$secondaryGroups = $member['mgroups_others'];
IPS class and so on is registered (authentication check of users work for example since I am able to access member_id using: $member['member_id']
. How do I get all group ids of the primary and secondary groups from a loaded user?