mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Avoid infinite redirection when logging out and when showing a custom login page after displaying the draft version of a page.
This commit is contained in:
parent
5f9348b016
commit
c048a019f6
@ -421,9 +421,12 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
$this->extend('memberLoggedOut');
|
||||
|
||||
$this->RememberLoginToken = null;
|
||||
Cookie::set('alc_enc', null);
|
||||
Cookie::set('alc_enc', null); // // Clear the Remember Me cookie
|
||||
Cookie::forceExpiry('alc_enc');
|
||||
|
||||
// Switch back to live in order to avoid infinite loops when redirecting to the login screen (if this login screen is versioned)
|
||||
Session::clear('readingMode');
|
||||
|
||||
$this->write();
|
||||
|
||||
// Audit logging hook
|
||||
|
@ -951,7 +951,7 @@ class Security extends Controller {
|
||||
*/
|
||||
public static function set_login_url($loginUrl) {
|
||||
self::$login_url = $loginUrl;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the URL of the log-in page.
|
||||
* Defaults to Security/login but can be re-set with {@link set_login_url()}
|
||||
|
Loading…
Reference in New Issue
Block a user