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: Only allow access to index.php page  (Read 7107 times)

0 Members and 1 Guest are viewing this topic.

modiba

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Only allow access to index.php page
« 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
« Last Edit: April 18, 2006, 08:50:56 am by GauGau »
Logged

Nibbler

  • Guest
Re: Only allow access to index.php page
« Reply #1 on: April 17, 2006, 06:02:09 pm »

Use the config option to disable anonymous browsing.
Logged

modiba

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Only allow access to index.php page
« Reply #2 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
Logged

modiba

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Only allow access to index.php page
« Reply #3 on: April 18, 2006, 12:24:56 am »

SOLVED
Logged

modiba

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Only allow access to index.php page
« Reply #4 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Only allow access to index.php page
« Reply #5 on: April 18, 2006, 08:50:44 am »

...as suggested in the FAQ
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.