From 47cac9922a9da0a4208685ffa85a236f98f0a455 Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 8 May 2009 07:55:01 +0000 Subject: [PATCH] MDL-18744 cas fix, credit goes to Thibault Le Meur --- auth/cas/auth.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/cas/auth.php b/auth/cas/auth.php index b710733823e..8f71de5b4fc 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -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'. @@ -97,7 +97,7 @@ class auth_plugin_cas extends auth_plugin_base { return; } - // Test si cas activé et paramêtres non remplis + // Test si cas activ� et param�tres non remplis if (empty($this->config->hostname)) { return; } @@ -107,7 +107,7 @@ class auth_plugin_cas extends auth_plugin_base { // Connection to CAS server $this->connectCAS(); - // Gestion de la connection CAS si accès direct d'un ent ou autre + // Gestion de la connection CAS si acc�s direct d'un ent ou autre if (phpCAS::checkAuthentication()) { $frm->username=phpCAS::getUser(); // if (phpCAS::getUser()=='esup9992')