Adding permission for another user_id Adding permission for another user_id
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Adding permission for another user_id

Started by eric.com.my, June 10, 2005, 09:40:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eric.com.my

I got a question over here. How do I define only admin, user_id 3 and user_id 8 that only have access with the coding below

if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

Abbas Ali


$accessArr = array(3,8);
if (!GALLERY_ADMIN_MODE && !in_array(USER_ID, $accessArr)) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);


You may have any number of ids in the array whom you want the access.
Chief Geek at Ranium Systems

eric.com.my

Thank you Abbas Ali, it works perfectly. (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fguestbook.eric.com.my%2Fimg%2Fsmilies%2Fnotworthy.gif&hash=54a87a98ab57e389fc8b7e69d59ff349c52fb4cf)