Skip to content
Snippets Groups Projects
Commit 372c24be authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

resurrect logout message, fixes #3937

Closes #3937

Merge request studip/studip!2791
parent 1993c6d1
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ page_open(["sess" => "Seminar_Session", "auth" => "Seminar_Default_Auth", "perm" ...@@ -30,7 +30,7 @@ page_open(["sess" => "Seminar_Session", "auth" => "Seminar_Default_Auth", "perm"
require_once 'lib/messaging.inc.php'; require_once 'lib/messaging.inc.php';
//nur wenn wir angemeldet sind sollten wir dies tun! //nur wenn wir angemeldet sind sollten wir dies tun!
if ($auth->auth["uid"]!="nobody") { if ($auth->auth['uid'] !== 'nobody') {
$my_messaging_settings = $GLOBALS['user']->cfg->MESSAGING_SETTINGS; $my_messaging_settings = $GLOBALS['user']->cfg->MESSAGING_SETTINGS;
//Wenn Option dafuer gewaehlt, alle ungelsesenen Nachrichten als gelesen speichern //Wenn Option dafuer gewaehlt, alle ungelsesenen Nachrichten als gelesen speichern
...@@ -38,13 +38,13 @@ if ($auth->auth["uid"]!="nobody") { ...@@ -38,13 +38,13 @@ if ($auth->auth["uid"]!="nobody") {
Message::markAllAs(); Message::markAllAs();
} }
$logout_user=$user->id; $logout_user = $user->id;
$_language = $_SESSION['_language']; $_language = $_SESSION['_language'];
$contrast = UserConfig::get($GLOBALS['user']->id)->USER_HIGH_CONTRAST; $contrast = UserConfig::get($GLOBALS['user']->id)->USER_HIGH_CONTRAST;
// TODO this needs to be generalized or removed // TODO this needs to be generalized or removed
//erweiterung cas //erweiterung cas
if ($auth->auth["auth_plugin"] == "cas"){ if ($auth->auth['auth_plugin'] === 'cas') {
$casauth = StudipAuthAbstract::GetInstance('cas'); $casauth = StudipAuthAbstract::GetInstance('cas');
$docaslogout = true; $docaslogout = true;
} }
...@@ -67,9 +67,14 @@ if ($auth->auth["uid"]!="nobody") { ...@@ -67,9 +67,14 @@ if ($auth->auth["uid"]!="nobody") {
if ($contrast) { if ($contrast) {
$_SESSION['contrast'] = $contrast; $_SESSION['contrast'] = $contrast;
} }
PageLayout::postSuccess(
_('Sie sind nun aus dem System abgemeldet.'),
array_filter([$GLOBALS['UNI_LOGOUT_ADD']])
);
} else { } else {
$sess->delete(); $sess->delete();
page_close(); page_close();
} }
header("Location:" . URLHelper::getURL("index.php?logout=true")); header('Location: ' . URLHelper::getURL('index.php'));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment