Permalink
Browse files

*** empty log message ***

  • Loading branch information...
1 parent 1d5bdcd commit 6dfddff7ce2f91259be7bd829d2a3cbf299fe170 jgutierr25 committed Jul 23, 2007
Showing with 11 additions and 7 deletions.
  1. +11 −7 auth/cas/auth.php
View
@@ -57,7 +57,7 @@ function auth_plugin_cas() {
* @return bool Authentication success or failure.
*/
function user_login ($username, $password) {
- $this->connectCAS();
+ $this->connectCAS();
return phpCAS::isAuthenticated();
}
/**
@@ -84,16 +84,20 @@ function can_change_password() {
*/
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 @@ function loginpage_hook() {
// 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;
}

0 comments on commit 6dfddff

Please sign in to comment.