Make a Lasting Impression

Join the Mailing List

Who's Online

27 user(s) are online (12 user(s) are browsing Support Forums)

Members: 0
Guests: 27

more...
ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net





Group Id
Home away from home
Joined:
2007/12/4 9:00
From Netherlands
Posts: 2220
The id (uid) of a user can be determined with:

icms
::$user -> getVar['uid']


How can the id (groupid) of the group a user belongs to be determined?

Posted on: 2012/3/23 11:59
_________________
McDonalds Store
Transfer the post to other applications Transfer


Re: Group Id
Home away from home
Joined:
2007/12/4 9:00
From Derbyshire/UK
Posts: 2076
can't quite remember but i'm sure you have to use the member handler.

it will return the value as an array i think because a user can belong to multiple groups.


$member_handler 
icms::handler('icms_member');
$groupArr $member_handler->getGroupsByUser($uid);

Posted on: 2012/3/23 23:43
_________________
Live as if you were to die tomorrow, Learn as if you were to live forever

The beauty of a living thing is not the atoms that go into it, but the way those atoms are put together!
Transfer the post to other applications Transfer


Re: Group Id
Home away from home
Joined:
2010/2/12 23:04
From Germany
Posts: 678
Quote:

Vaughan wrote:
can't quite remember but i'm sure you have to use the member handler.

it will return the value as an array i think because a user can belong to multiple groups.


$member_handler 
icms::handler('icms_member');
$groupArr $member_handler->getGroupsByUser($uid);


Vaughan is right. But this way you can get an array of groups. You also can get the best group of an user, if you need a single group.

$group 
$member_handler->getUserBestGroup($uid);

This will return the best group of an user with the most rights.

Posted on: 2012/3/24 6:48
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]