List of users by group

Joined: 22 Jun 2008

List of users by group

Posted:29 May 2009 (01:01 UTC)
I am trying to create a module to get list of users based on current user's default group.

This is the code I am using...for some minor reason it is not getting the default group id, when I hard code $groupId it is getting the list of users. So there is some minor problem in my code some where.

global $gBitUser, $gBitPermUser, $gQueryUser, $gQueryUserId, $gBitSmarty;

extract( $moduleParams );

$userId = $gBitUser->mUserId;
$groupId = $gBitUser->getDefaultGroup('$userId');
$groupMembers = $gBitUser->getGroupUsers($groupId);
$gBitSmarty->assign( 'groupMembers', $groupMembers );
Joined: 22 Jun 2008

Re: List of users by group

Posted:31 May 2009 (02:35 UTC)
never mind...found where the problem.

getDefaultGroup function doesn't give default_group_id of user_users which I was looking for. It gives default group of existing groups.

So I wrote my own custom function and got the output what I was looking for.
  Page 1 of 1  1 
If you are already registered, please enter your login credentials.
Anonymous Post