coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: stardust on June 21, 2008, 06:50:53 AM

Title: [Solved]: Adding private page? (for registered users only)
Post by: stardust on June 21, 2008, 06:50:53 AM
Hope I posted this in the right section; if not, please move it.

When creating a new php page using this code (http://forum.coppermine-gallery.net/index.php/topic,21000.0.html), I'm wondering is there a way to set it that only "Registered Users" can view the page? Like how registered users can view private albums. Is there anything to edit/add to the code to allow only registered users to view the new page?
Title: Re: Adding private page? (for registered users only)
Post by: Nibbler on June 21, 2008, 01:14:58 PM
Before the pageheader() call add:

if (!USER_ID) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
Title: Re: Adding private page? (for registered users only)
Post by: stardust on June 22, 2008, 03:26:58 AM
That works perfectly, thanks :)