Skip to content

Commit

Permalink
anonymous login error solve (trash way)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixfr committed Apr 29, 2005
1 parent 6d9d3d1 commit e5a144b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auth/cas/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//CHANGELOG:
//05.03.2005 replace /login/index.php

require_once($CFG->dirroot.'/auth/cas/lib.php');

//Define variables used in page
if (!$site = get_site()) {
Expand Down Expand Up @@ -61,6 +60,7 @@
$frm = false;
} else if (!$user) {
if ($CFG->auth == "cas" && $frm->username != 'guest'){ /// Cas SSO case
require_once($CFG->dirroot.'/auth/cas/lib.php');
$user = cas_authenticate_user_login($frm->username, $frm->password);
}else{
$user = authenticate_user_login($frm->username, $frm->password);
Expand Down Expand Up @@ -168,14 +168,15 @@

} else {
if ($CFG->auth == "cas" ){ /// CAS error login
require_once($CFG->dirroot.'/auth/cas/lib.php');
$errormsg = get_string("invalidcaslogin");
phpCAS::logout("$CFG->wwwroot/auth/cas/forbidden.php");
}else{
$errormsg = get_string("invalidlogin");
}
}
}

require_once($CFG->dirroot.'/auth/cas/lib.php');
$user=cas_automatic_authenticate($user);
if ($user) {
if (! $user->confirmed ) { // they never confirmed via email
Expand Down

0 comments on commit e5a144b

Please sign in to comment.