Redirect to index if the logout link is accessed without valid session
This is needed to prevent "Token expired" messages while login if a session is expired @see https://github.com/owncloud/core/pull/8443#issuecomment-42425583
This commit is contained in:
parent
73b914ddbc
commit
e1e1009ccc
|
@ -768,6 +768,14 @@ class OC {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Redirect to index if the logout link is accessed without valid session
|
||||||
|
// this is needed to prevent "Token expired" messages while login if a session is expired
|
||||||
|
// @see https://github.com/owncloud/core/pull/8443#issuecomment-42425583
|
||||||
|
if(isset($_GET['logout']) && !OC_User::isLoggedIn()) {
|
||||||
|
header("Location: " . OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Someone is logged in :
|
// Someone is logged in :
|
||||||
if (OC_User::isLoggedIn()) {
|
if (OC_User::isLoggedIn()) {
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
|
|
Loading…
Reference in New Issue