MDL-18744 cas fix, credit goes to Thibault Le Meur

This commit is contained in:
skodak
2009-05-08 07:53:11 +00:00
parent feeb76097b
commit 623a81e19a
+2 -2
View File
@@ -57,8 +57,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'.