From 6dfddff7ce2f91259be7bd829d2a3cbf299fe170 Mon Sep 17 00:00:00 2001 From: jgutierr25 Date: Mon, 23 Jul 2007 11:37:21 +0000 Subject: [PATCH] *** empty log message *** --- auth/cas/auth.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/auth/cas/auth.php b/auth/cas/auth.php index b61d369ba3..5188d3f532 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -57,7 +57,7 @@ class auth_plugin_cas extends auth_plugin_base { * @return bool Authentication success or failure. */ function user_login ($username, $password) { - $this->connectCAS(); + $this->connectCAS(); return phpCAS::isAuthenticated(); } /** @@ -84,16 +84,20 @@ class auth_plugin_cas extends auth_plugin_base { */ function loginpage_hook() { global $frm; - global $test; global $CFG; + global $SESSION; + $site = get_site(); $CASform = get_string("CASform","auth"); $username = optional_param("username"); + if (!empty($username)) { - return; + if (strstr($SESSION->wantsurl,'ticket') || strstr($SESSION->wantsurl,'NOCAS')) + unset($SESSION->wantsurl); + 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; } @@ -104,8 +108,8 @@ class auth_plugin_cas extends auth_plugin_base { // 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') - $frm->username='erhar0062'; +// if (phpCAS::getUser()=='esup9992') +// $frm->username='erhar0062'; $frm->password="passwdCas"; return; } -- 2.39.5