4 include_once 
'Auth/Container.php';
 
   43                 if(!$PHPCAS_CLIENT->isAuthenticated())
 
   45                         $PHPCAS_CLIENT->forceAuthentication();
 
   56                 $ilLog->write(__METHOD__.
': Successful CAS login.');
 
   59                 include_once 
'./Services/LDAP/classes/class.ilLDAPServer.php';
 
   65                 include_once(
"./Services/CAS/lib/CAS.php");
 
   66                 if ($PHPCAS_CLIENT->getUser() != 
"")
 
   68                         $username = $PHPCAS_CLIENT->getUser();
 
   69                         $ilLog->write(__METHOD__.
': Username: '.$username);
 
   72                         include_once(
'./Services/User/classes/class.ilObjUser.php');
 
   75                         if ($local_user != 
"")
 
   77                                 $a_auth->setAuth($local_user);
 
   81                                 if (!$ilSetting->get(
"cas_create_users"))
 
   92                                 $newUser[
"firstname"] = $local_user;
 
   93                                 $newUser[
"lastname"] = 
"";
 
   95                                 $newUser[
"login"] = $local_user;
 
   98                                 $newUser[
"passwd"] = 
""; 
 
  102                                 $newUser[
"auth_mode"] = 
"cas";
 
  103                                 $newUser[
"ext_account"] = $username;
 
  104                                 $newUser[
"profile_incomplete"] = 1;
 
  107                                 $userObj->assignData($newUser);
 
  108                                 $userObj->setTitle($userObj->getFullname());
 
  109                                 $userObj->setDescription($userObj->getEmail());
 
  112                                 $userObj->setLanguage($ilSetting->get(
"language"));
 
  115                                 $userObj->setTimeLimitOwner(7);
 
  116                                 $userObj->setTimeLimitUnlimited(1);
 
  117                                 $userObj->setTimeLimitFrom(time());
 
  118                                 $userObj->setTimeLimitUntil(time());
 
  121                                 $userObj->setOwner(0);
 
  123                                 $userObj->setActive(1);
 
  125                                 $userObj->updateOwner();
 
  128                                 $userObj->saveAsNew();
 
  131                                 $userObj->writePrefs();
 
  134                                 $rbacadmin->assignUser($ilSetting->get(
'cas_user_default_role'), $userObj->getId(),
true);
 
  137                                 $a_auth->setAuth($local_user);
 
  143                         $ilLog->write(__METHOD__.
': Login failed.');
 
  159                 include_once 
'./Services/LDAP/classes/class.ilLDAPServer.php';
 
  164                 $GLOBALS[
'ilLog']->write(__METHOD__.
' Using ldap data source for user: '.$ext_account);
 
  166                 include_once 
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
 
  169                 $sync->setUserData(array());
 
  170                 #$sync->forceCreation($this->force_creation); 
  172                 $sync->forceCreation(
true);
 
  175                         $internal_account = $sync->sync();
 
  177                 catch(UnexpectedValueException $e) {
 
  178                         $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
 
  185                         $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
 
  191                         $GLOBALS[
'ilLog']->write(__METHOD__.
': Starting account migration.');
 
  193                         ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
 
  195                 $a_auth->setAuth($internal_account);
 
  208         public function fetchData($a_username,$a_password,$isChallengeResponse = 
false)
 
  212                 $ilLog->write(__METHOD__.
': Fetch Data called');
 
  213                 return $PHPCAS_CLIENT->isAuthenticated();
 
  220                 include_once(
"./Services/CAS/lib/CAS.php");
 
  223                 $this->server_hostname = $ilSetting->get(
'cas_server');
 
  224                 $this->server_port = (int) $ilSetting->get(
'cas_port');
 
  225                 $this->server_uri = (string) $ilSetting->get(
'cas_uri');
 
  229                         $this->server_version,
 
  230                         $this->server_hostname,