Advanced search  

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]

Pages: [1]   Go Down

Author Topic: How to prevent access from certain groups (Invision related)  (Read 3987 times)

0 Members and 1 Guest are viewing this topic.

smarko

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
    • http://hoito.org
How to prevent access from certain groups (Invision related)
« on: December 06, 2004, 03:58:19 pm »

How can I prevent certain groups (Invision bridged Coppermine) from accessing galleries? Like groups validating, guests and banned? I know, that I can check if user is logged in, but it's not quite enough..

 if (USER_ID){

 } else {
{
    $redirect = $redirect . "loginplease.php";
   header("Location: $redirect");

    exit();
}}
« Last Edit: December 08, 2004, 03:51:14 am by TranzNDance »
Logged

smarko

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
    • http://hoito.org
Re: How to prevent access from certain groups (Invision related)
« Reply #1 on: December 08, 2004, 03:38:36 am »

Never mind. I figured it out myself. Group id 1 and 5 are for validating and banned users.

Code: [Select]
if (USER_ID)
{
  if (($USER_DATA['group_id'] == "1") || ($USER_DATA['group_id'] == "5"))
    {
      $redirect = $redirect . "messagetext.html";
      header("Location: $redirect");
      exit();
    }
}
else {
  redirect = $redirect . "messagetext.html";
  header("Location: $redirect");
  exit();
}
Logged

chaggydawg

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to prevent access from certain groups (Invision related)
« Reply #2 on: April 02, 2005, 02:59:07 am »

small typo, should be:

Code: [Select]
if (USER_ID)
{
  if (($USER_DATA['group_id'] == "1") || ($USER_DATA['group_id'] == "5"))
    {
      $redirect = $redirect . "messagetext.html";
      header("Location: $redirect");
      exit();
    }
}
else {
  $redirect = $redirect . "messagetext.html";
  header("Location: $redirect");
  exit();
}
Logged
Pages: [1]   Go Up
 

Page created in 0.012 seconds with 14 queries.