MDL-58244 shibboleth: handle users who are logged out

If the user is (already) logged out, do not access $USER->auth and redirect him to the return URL.
This commit is contained in:
Martin Gauk
2017-04-13 10:07:29 +00:00
parent f14510d944
commit 9de798de71
+5 -4
View File
@@ -26,13 +26,14 @@ if (!is_enabled_auth('shibboleth')) {
$inputstream = file_get_contents("php://input");
if ($action == 'logout' && !empty($redirect)) {
if ($USER->auth == 'shibboleth') {
// Logout out user from application.
if (isloggedin($USER) && $USER->auth == 'shibboleth') {
// Logout user from application.
require_logout();
// Finally, send user to the return URL.
redirect($redirect);
}
// Finally, send user to the return URL.
redirect($redirect);
} else if (!empty($inputstream)) {
// Back channel logout.