diff --git a/languages/en.ini b/languages/en.ini index 065540f6bbaeb47cc655c7f17d895c082027b641..4653f0644e44791b2bfe790f43e62dff255ac768 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -55,7 +55,6 @@ authentication_error_admin = "We cannot log you in at this time. Please contact authentication_error_blank = "Login information cannot be blank." authentication_error_denied = "Credentials do not match! Access denied." authentication_error_invalid = "Invalid login -- please try again." -authentication_error_loggedout = "You have logged out." authentication_error_technical = "We cannot log you in at this time. Please try again later." Author = Author Author Browse = "Author Browse" diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php index f0a52a925978a2a3b368e89b232648405402a1d4..07e1533296f9d69b3a1c4126836efbee54a784af 100644 --- a/module/VuFind/src/VuFind/Auth/Manager.php +++ b/module/VuFind/src/VuFind/Auth/Manager.php @@ -199,7 +199,6 @@ class Manager implements ServiceLocatorAwareInterface // Clear out the cached user object and session entry. $this->currentUser = false; unset($this->session->userId); - setcookie('loggedOut', 1, null, '/'); // Destroy the session for good measure, if requested. if ($destroy) { @@ -214,16 +213,6 @@ class Manager implements ServiceLocatorAwareInterface return $url; } - /** - * Checks whether the user has recently logged out. - * - * @return bool - */ - public function userHasLoggedOut() - { - return isset($_COOKIE['loggedOut']) && $_COOKIE['loggedOut']; - } - /** * Checks whether the user is logged in. * @@ -269,7 +258,6 @@ class Manager implements ServiceLocatorAwareInterface { $this->currentUser = $user; $this->session->userId = $user->id; - setcookie('loggedOut', '', time() - 3600, '/'); // clear logged out cookie } /** diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index 8d305f96109e5220589e0e7aa77ef6e46418786d..2d53f4093239f80747080f8f0450f51808d7b274 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -58,17 +58,8 @@ class MyResearchController extends AbstractBase try { $this->getAuthManager()->login($this->getRequest()); } catch (AuthException $e) { - $msg = $e->getMessage(); - // If a Shibboleth-style login has failed and the user just logged - // out, we need to override the error message with a more relevant - // one: - if ($msg == 'authentication_error_admin' - && $this->getAuthManager()->userHasLoggedOut() - && $this->getSessionInitiator() - ) { - $msg = 'authentication_error_loggedout'; - } - $this->flashMessenger()->setNamespace('error')->addMessage($msg); + $this->flashMessenger()->setNamespace('error') + ->addMessage($e->getMessage()); } }