Problems w/ preventing unregistered user viewing gallery... Problems w/ preventing unregistered user viewing gallery...
 

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]

Main Menu

Problems w/ preventing unregistered user viewing gallery...

Started by clayaikenfancom, October 18, 2005, 03:13:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

clayaikenfancom

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?

kegobeer

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

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.

Nibbler

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


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

clayaikenfancom

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

clayaikenfancom

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
*/

Stramm