forked from GNUsocial/gnu-social
		
	Fixup rememberme cookie handling in the POST only case
darcs-hash:20080714050037-08d49-b00c6370c4eed918eee94f828e2d6098b922ba69.gz
This commit is contained in:
		@@ -548,7 +548,7 @@ function common_forgetme() {
 | 
			
		||||
 | 
			
		||||
# who is the current user?
 | 
			
		||||
function common_current_user() {
 | 
			
		||||
	if ($_REQUEST[session_name()]) {
 | 
			
		||||
	if ($_REQUEST[session_name()] || $_SESSION && $_SESSION['userid']) {
 | 
			
		||||
		common_ensure_session();
 | 
			
		||||
		$id = $_SESSION['userid'];
 | 
			
		||||
		if ($id) {
 | 
			
		||||
@@ -559,6 +559,11 @@ function common_current_user() {
 | 
			
		||||
	}
 | 
			
		||||
	# that didn't work; try to remember
 | 
			
		||||
	$user = common_remembered_user();
 | 
			
		||||
	common_debug("Got User " . $user->nickname);
 | 
			
		||||
	if ($user) {
 | 
			
		||||
	    common_debug("Faking session on remembered user");
 | 
			
		||||
	    $_SESSION['userid'] = $user->id;
 | 
			
		||||
	}
 | 
			
		||||
	return $user;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user