[Solved]: Adding private page? (for registered users only) [Solved]: Adding private page? (for registered users only)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Adding private page? (for registered users only)

Started by stardust, June 21, 2008, 06:50:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stardust

Hope I posted this in the right section; if not, please move it.

When creating a new php page using this code, 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?

Nibbler

Before the pageheader() call add:

if (!USER_ID) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

stardust