forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: AfroJoJo on December 23, 2006, 12:36:02 am

Title: Require user to be logged in to view profiles
Post by: AfroJoJo 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?
Title: Re: Require user to be logged in to view profiles
Post by: Joachim Müller 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__);
}