coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: modiba on April 17, 2006, 05:03:54 PM

Title: Only allow access to index.php page
Post by: modiba on April 17, 2006, 05:03:54 PM
Hello,

I am hoping someone can help me out.

How can I prevent users from accessing any photo album unless they login?

So, unless a user logs in they can only see the index.php page.

Many thanks,
Greg
Title: Re: Only allow access to index.php page
Post by: Nibbler on April 17, 2006, 06:02:09 PM
Use the config option to disable anonymous browsing.
Title: Re: Only allow access to index.php page
Post by: modiba on April 17, 2006, 11:08:30 PM
Hello,

Thanks for getting back to me.

Disalbing anonymous browsing via the config option will only allow the user to visit the login.php and register.php pages.

I want to allow anonymous viewing of index.php too.

How can I achieve this?

Thanks again,
Greg
Title: Re: Only allow access to index.php page
Post by: modiba on April 18, 2006, 12:24:56 AM
SOLVED
Title: Re: Only allow access to index.php page
Post by: modiba on April 18, 2006, 12:25:27 AM
pasted:

if (!USER_ID) cpg_die(ERROR, 'You need to <a href=register.php>register</ a> to access this page', __FILE__, __LINE__);

to the top of thumbnails.php

Works fine.

Thanks anyway

Greg
Title: Re: Only allow access to index.php page
Post by: Joachim Müller on April 18, 2006, 08:50:44 AM
...as suggested in the FAQ (http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#viewThumbnailsOnly)