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:
jean 2012-02-09 15:58:05 +13:00 committed by Ingo Schommer
parent 5f9348b016
commit c048a019f6
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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()}