From e81a5fd4e816e1d823f0c4e2728cdfc45a9afa49 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 17 Jun 2013 13:20:57 -0400 Subject: [PATCH] Reverted unintentional commit. --- languages/en.ini | 1 - module/VuFind/src/VuFind/Auth/Manager.php | 12 ------------ .../src/VuFind/Controller/MyResearchController.php | 13 ++----------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/languages/en.ini b/languages/en.ini index 065540f6bba..4653f0644e4 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 f0a52a92597..07e1533296f 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 8d305f96109..2d53f409323 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()); } } -- GitLab