How do you detect user group? How do you detect user group?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

How do you detect user group?

Started by dreams83, May 12, 2007, 03:23:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dreams83

How do you detect the group that a user belong too? I have a plug-in that is running and I want to be able to detect like if the user belong to a certain group:

Like in the debugger:
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => ntsuj_plig
    [groups] => Array
        (
            [0] => 102
            [1] => 177
            [2] => 185
            [3] => 232
            [4] => 938
        )


in the plug-in i was able to use like USER_NAME and that will give me ntsuj_plig and same thing for USER_ID to get 2. Is there a similar way I could get the groups array so I can determine which group a user belong to? Maybe if there is a guide on the inner working of coppermine you guys and girls can point me to it because I want to know more about the workings of coppermine too.

Nibbler

The debugger is displaying the $USER_DATA array. The groups are in that - $USER_DATA['groups']

dreams83

Got it now

define

global $USER_DATA;

then I was able to use $USER_DATA['groups']

Thank You