Require user to be logged in to view profiles Require user to be logged in to view profiles
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Require user to be logged in to view profiles

Started by AfroJoJo, December 23, 2006, 12:36:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AfroJoJo

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?

Joachim Müller

Edit profile.php, find include("include/smilies.inc.php");and add into a new line after itif (!USER_ID) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}