coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: Daveo on August 31, 2005, 12:04:53 PM

Title: Security
Post by: Daveo on August 31, 2005, 12:04:53 PM
How can i stop unregistered user from viewing my photos, i want to only select users that i know, i don't want any other guest viewing them. How can i set this up?
Title: Re: Security
Post by: Stramm on August 31, 2005, 12:18:33 PM
from the FAQs... anon users redirected to register.php
http://coppermine.sourceforge.net/faq.php#registeredUsersOnly

I don't like that very much so I allow anon to only view thumbs but not the normal and fullsized

in displayimage.php after
require('include/init.inc.php');
add
// mod - only registererd users can view images
$unregisteredcanviewthumbs=false;
if(!$unregisteredcanviewthumbs)
  if(!USER_ID) cpg_die(ERROR, 'You must be a registered user to do that!<BR>Please register or login!', __FILE__, __LINE__);
// end mod


you can set it to true/ false... you also can make this a config setting... no problem at all ;)
Title: Re: Security
Post by: Daveo on August 31, 2005, 12:55:01 PM
spot on nice one! ;D