Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Solved]: Adding private page? (for registered users only)  (Read 4306 times)

0 Members and 1 Guest are viewing this topic.

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
[Solved]: Adding private page? (for registered users only)
« 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, 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?
« Last Edit: June 22, 2008, 11:15:30 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: Adding private page? (for registered users only)
« Reply #1 on: June 21, 2008, 01:14:58 pm »

Before the pageheader() call add:

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

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Adding private page? (for registered users only)
« Reply #2 on: June 22, 2008, 03:26:58 am »

That works perfectly, thanks :)
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 16 queries.