From: skodak Date: Fri, 8 May 2009 07:54:24 +0000 (+0000) Subject: MDL-18744 cas fix, credit goes to Thibault Le Meur X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3db835d1ae638e64ee98b74b001b256fdeb9ca1a;p=moodle.git MDL-18744 cas fix, credit goes to Thibault Le Meur --- diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 7051541220..2c15875199 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -58,8 +58,8 @@ class auth_plugin_cas extends auth_plugin_base { * @return bool Authentication success or failure. */ function user_login ($username, $password) { - $this->connectCAS(); - return phpCAS::isAuthenticated(); + $this->connectCAS(); + return phpCAS::isAuthenticated() && (phpCAS::getUser() == $username); } /** * Returns true if this authentication plugin is 'internal'.