Browse Source

Merge pull request #766 from Oldiesmann/release-2.1

! Don't throw errors at guests trying to access members-only sections of...
Michael Eshom 11 years ago
parent
commit
76daaf1798
1 changed files with 5 additions and 1 deletions
  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))