Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Only allow access to index.php page  (Read 6880 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.015 seconds with 15 queries.