Permalink
Browse files

anonymous login error solve (trash way)

  • Loading branch information...
1 parent 6d9d3d1 commit e5a144bca70dcb2ffddccd04f5e3ccb4feae9d10 phoenixfr committed Apr 29, 2005
Showing with 3 additions and 2 deletions.
  1. +3 −2 auth/cas/login.php
View
@@ -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()) {
@@ -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);
@@ -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

0 comments on commit e5a144b

Please sign in to comment.