diff --git a/library/Creq/Controller/Action.php b/library/Creq/Controller/Action.php index 2a9a5049aaf564635f412a723de37ef71d81dcfe..ac76490dc6b6b6507e871113c17b90e98bb67e2a 100644 --- a/library/Creq/Controller/Action.php +++ b/library/Creq/Controller/Action.php @@ -23,6 +23,11 @@ class Creq_Controller_Action extends Unl_Controller_Action return; } + // If a user is already logged in, only redirect to CAS if this is a GET request. + if (Zend_Auth::getInstance()->hasIdentity() && $_SERVER['REQUEST_METHOD'] != 'GET') { + return; + } + if (array_key_exists('unl_sso', $_COOKIE) || Zend_Auth::getInstance()->hasIdentity()) { Auth_UserModel::authenticateUser(); }