From 3db835d1ae638e64ee98b74b001b256fdeb9ca1a Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 8 May 2009 07:54:24 +0000 Subject: [PATCH] MDL-18744 cas fix, credit goes to Thibault Le Meur --- auth/cas/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'. -- 2.39.5