Only remove the "remember me" cookie at submitting the auth form
Fixes loss of remember (Friendica) cookie on switching Managed accounts
This commit is contained in:
parent
df6304cc42
commit
cbaf196f50
|
@ -179,6 +179,10 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params'
|
|||
goaway(z_root());
|
||||
}
|
||||
|
||||
if ( ! $_POST['remember']) {
|
||||
new_cookie(0); // 0 means delete on browser exit
|
||||
}
|
||||
|
||||
// if we haven't failed up this point, log them in.
|
||||
$_SESSION['remember'] = $_POST['remember'];
|
||||
$_SESSION['last_login_date'] = datetime_convert('UTC','UTC');
|
||||
|
|
|
@ -141,9 +141,6 @@ function authenticate_success($user_record, $login_initial = false, $interactive
|
|||
new_cookie(604800, $user_record);
|
||||
unset($_SESSION['remember']);
|
||||
}
|
||||
else {
|
||||
new_cookie(0); // 0 means delete on browser exit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue