forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: Hot Rides on June 04, 2008, 05:30:22 pm

Title: Download Resized question
Post by: Hot Rides on June 04, 2008, 05:30:22 pm
I have the mod set up to work with only registered users, but I really want to limit it to certain user groups but I can't for the life of me figure out the code ???

right now im using a simple if statement
Code: [Select]
if(!USER_ID) return $pic_data;
thanks in advance
Title: Re: Download Resized question
Post by: Stramm on June 04, 2008, 07:57:40 pm
tried something like that?

Code: [Select]
if (USER_GROUP != 'my_group' || USER_GROUP != 'my_other_group' )  return $pic_data;
Title: Re: Download Resized question
Post by: Hot Rides on June 04, 2008, 08:14:25 pm
just tried it, it doesnt work because its a bridged install, it has to call up the smf users, im searching for the correct way unless you have an idea
Title: Re: Download Resized question
Post by: Stramm on June 04, 2008, 08:23:16 pm
shouldn't make a difference... the constant USER_GROUP is defined in the bridge file and holds the users group (as the name indicates).
Logged in as admin the constant has stored eg. 'Administrators' (when using coppermine bridge file).

Do an
Code: [Select]
echo "User Group: ".USER_GROUP;somewhere to check
Title: Re: Download Resized question
Post by: Hot Rides on June 04, 2008, 08:45:17 pm
i get this displayed, see attachment
Title: Re: Download Resized question
Post by: Stramm on June 04, 2008, 10:07:55 pm
weird... when I have a bridged test environment again, I'll have a look