Hello everybody!
I know there is this setting in the Configuration: "Allow unlogged users (guest or anonymous) access", where you can choose either "Yes" or "No".
I'm just wondering, is there any way to allow access only to users who are included in special groups, and block it to the rest (guests and registered users)? I know that this could be done by setting this propierty in all of the albums, but is it possible to do it more quickly somehow?
Thanks!
Quote from: Naif on June 04, 2007, 05:13:54 PM
Hello everybody!
I know there is this setting in the Configuration: "Allow unlogged users (guest or anonymous) access", where you can choose either "Yes" or "No".
I'm just wondering, is there any way to allow access only to users who are included in special groups, and block it to the rest (guests and registered users)? I know that this could be done by setting this propierty in all of the albums, but is it possible to do it more quickly somehow?
Thanks!
I´m wondering the same thing.
read the old CPG 1.3 faq about unlogged user access
http://coppermine-gallery.net/demo/cpg13x/docs/faq.htm#registeredUsersOnly
that's pretty much what you need. You just need to adopt the code a lil bit
$USER_DATA['groups'][0]
holds the first group id a user is in
so it'll look for example like
if ($USER_DATA['groups'][0] == 2){
cpg_die(ERROR, 'You do not have access to the gallery', __FILE__, __LINE__);
}