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: Problems w/ preventing unregistered user viewing gallery...  (Read 3649 times)

0 Members and 1 Guest are viewing this topic.

clayaikenfancom

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Problems w/ preventing unregistered user viewing gallery...
« on: October 18, 2005, 03:13:12 pm »

I just want to let you know that I have searched this forum for this mod and tried what I found and it didn't work. I am trying to make it so only registered users can view the full size pics. This is how I have my displayimage.php edited:

/**
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

* Local functions definition
*/

I log out and can still view everything full size. I also tried this mod:

edit
displayimage.php and index.php and search.php and thumbnails.php
and search for


require('include/init.inc.php');

and add after it

if (USER_ID){

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

   exit();
        }
}



still not working. What am I doing wrong?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

clayaikenfancom

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Problems w/ preventing unregistered user viewing gallery...
« Reply #2 on: October 18, 2005, 04:46:02 pm »

I already tried that one. Posted above is the exact code I edited in displayimage.php. Here is is again:

/**
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

* Local functions definition
*/


it should work but yet it doesn't.
Logged

Nibbler

  • Guest
Re: Problems w/ preventing unregistered user viewing gallery...
« Reply #3 on: October 18, 2005, 06:36:20 pm »

There is no chance that will work, you added the code in the wrong place

Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
/**
* Local functions definition
*/
Logged

clayaikenfancom

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Problems w/ preventing unregistered user viewing gallery...
« Reply #4 on: October 18, 2005, 06:40:45 pm »

I changed it and it still doesn't work!! I am logged out and everything. Ahhh. What else should I do?
Logged

clayaikenfancom

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Problems w/ preventing unregistered user viewing gallery...
« Reply #5 on: October 18, 2005, 07:07:17 pm »

This is now what I have and it still doesnt work:

if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
/**
* Local functions definition
*/
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Problems w/ preventing unregistered user viewing gallery...
« Reply #6 on: October 19, 2005, 08:32:41 am »

in what file is this code?

you also can try http://forum.coppermine-gallery.net/index.php?topic=21332.0
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.