Page 1 of 1

Detecting Group

Posted: Mon Nov 17, 2008 6:09 am
by forumace
How do I go about detecting a users group when they are posting? Like in the posting.php. For instance If user is part of group 'x' then do 'y'? Thanks.

Re: Detecting Group

Posted: Mon Nov 17, 2008 4:36 pm
by ameeck
includes/functions_user.php must be included for this to work:

Code: Select all

if (group_memberships($group_id, $user_id, true))
{
    // do this
} 
However try to use it as less as possible, since it's not a fast query.