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: Require user to be logged in to view profiles  (Read 3252 times)

0 Members and 1 Guest are viewing this topic.

AfroJoJo

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Require user to be logged in to view profiles
« on: December 23, 2006, 12:36:02 am »

When someone goes to http://www.domain.com/gallery/profile.php?uid=(VALID USER NUMBER HERE), it shows the users profile if they are logged in or not. Is there a way to redirect to the login page if someone goes to that URL and is not logged in?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Require user to be logged in to view profiles
« Reply #1 on: December 23, 2006, 10:41:00 pm »

Edit profile.php, find
Code: [Select]
include("include/smilies.inc.php");and add into a new line after it
Code: [Select]
if (!USER_ID) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.