Bläddra i källkod

! Don't throw errors at guests trying to access members-only sections of the profile when a user isn't specified...

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 år sedan
förälder
incheckning
7d66f73bd9
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      Sources/Profile.php

+ 5 - 1
Sources/Profile.php

@@ -41,9 +41,13 @@ function ModifyProfile($post_errors = array())
 	// ... or by id_member?
 	elseif (!empty($_REQUEST['u']))
 		$memberResult = loadMemberData((int) $_REQUEST['u'], false, 'profile');
-	// If it was just ?action=profile, edit your own profile.
+	// If it was just ?action=profile, edit your own profile, but only if you're not a guest.
 	else
+	{
+		// Members only...
+		is_not_guest();
 		$memberResult = loadMemberData($user_info['id'], false, 'profile');
+	}
 
 	// Check if loadMemberData() has returned a valid result.
 	if (!is_array($memberResult))