]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18744 cas fix, credit goes to Thibault Le Meur
authorskodak <skodak>
Fri, 8 May 2009 07:54:24 +0000 (07:54 +0000)
committerskodak <skodak>
Fri, 8 May 2009 07:54:24 +0000 (07:54 +0000)
auth/cas/auth.php

index 7051541220896dae022b5cd790c2afb7424e27e0..2c15875199076858dfa71a0ae7e1794fdee0192b 100644 (file)
@@ -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'.