* @return bool Authentication success or failure.
*/
function user_login ($username, $password) {
- $this->connectCAS();
+ $this->connectCAS();
return phpCAS::isAuthenticated();
}
/**
*/
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;
}
// 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;
}