25                 $ilCtrl->saveParameter($this, array(
"rep_ref_id", 
"lang", 
"target", 
"client_id"));
 
   33                 $cmd = $this->ctrl->getCmd(
"processIndexPHP");
 
   34                 $next_class = $this->ctrl->getNextClass($this);
 
   38                         case "ilaccountregistrationgui":
 
   39                                 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
 
   43                         case "ilpasswordassistancegui":
 
   44                                 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
 
   60                 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
 
   61                 $this->ctrl->setCmd(
"");
 
   70                 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
 
   71                 $this->ctrl->setCmd(
"");
 
   84                 $status = $ilAuth->getStatus();
 
   85                 if ($status == 
"" && isset(
$_GET[
"auth_stat"]))
 
   87                         $status = 
$_GET[
"auth_stat"];
 
  104                         if (empty(
$_GET[
'cookies']))
 
  106                                 $additional_params = 
'';                
 
  109                         $additional_params .= 
'&login_to_purchase_object=1&forceShoppingCartRedirect=1';
 
  114                                 header(
"Location: login.php?target=".$_GET[
"target"].
"&soap_pw=".$_GET[
"soap_pw"].
"&ext_uid=".$_GET[
"ext_uid"].
"&cookies=nocookies&client_id=".rawurlencode(CLIENT_ID).
"&lang=".$_GET[
'lang'].$additional_params);
 
  123                         unset(
$_GET[
'cookies']);
 
  127                 if (!$ilSetting->get(
"setup_ok"))
 
  129                         die(
"Setup is not completed. Please run setup routine again. (Login)");
 
  132                 if ($ilSetting->get(
"shib_active") && $ilSetting->get(
"shib_hos_type"))
 
  134                         require_once 
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
 
  139                 if (isset($WAYF) && $WAYF->isSelection())
 
  141                         if ($WAYF->isValidSelection())
 
  144                                 $WAYF->setSAMLCookie();
 
  150                 elseif ($ilAuth->getAuth())
 
  155                         if(!$ilUser->checkTimeLimit())
 
  164                         include_once 
'./Services/Tracking/classes/class.ilOnlineTracking.php';
 
  168                         if ($ilSetting->get(
"chat_active"))
 
  170                                 include_once 
"./Modules/Chat/classes/class.ilChatServerCommunicator.php";
 
  171                                 include_once 
"./Modules/Chat/classes/class.ilChatRoom.php";
 
  178                         include_once 
'./Modules/Forum/classes/class.ilObjForum.php';
 
  181                         if (
$_GET[
"rep_ref_id"] != 
"")
 
  191                 $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.login.html",
 
  195                 if (
$_GET[
"lang"] == 
"")
 
  197                         $_GET[
"lang"] = $ilIliasIniFile->readVariable(
"language",
"default");
 
  203                 $tpl->setVariable(
"PAGETITLE", $lng->txt(
"startpage"));
 
  204                 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
 
  206                 $languages = $lng->getInstalledLanguages();
 
  208                 foreach ($languages as $lang_key)
 
  210                         $tpl->setCurrentBlock(
"languages");
 
  211                         $tpl->setVariable(
"LANG_KEY", $lang_key);
 
  212                         $tpl->setVariable(
"LANG_NAME",
 
  214                         $tpl->setVariable(
"BORDER", 0);
 
  215                         $tpl->setVariable(
"VSPACE", 0);
 
  216                         $tpl->parseCurrentBlock();
 
  220                 include_once 
'Services/Registration/classes/class.ilRegistrationSettings.php';
 
  223                         $tpl->setCurrentBlock(
"new_registration");
 
  224                         $tpl->setVariable(
"REGISTER", $lng->txt(
"registration"));
 
  225                         $tpl->setVariable(
"CMD_REGISTER",
 
  226                                 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui", 
""));
 
  227                         $tpl->parseCurrentBlock();
 
  230                 if ($ilSetting->get(
"password_assistance"))
 
  232                         $tpl->setCurrentBlock(
"password_assistance");
 
  233                         $tpl->setVariable(
"FORGOT_PASSWORD", $lng->txt(
"forgot_password"));
 
  234                         $tpl->setVariable(
"FORGOT_USERNAME", $lng->txt(
"forgot_username"));
 
  235                         $tpl->setVariable(
"CMD_FORGOT_PASSWORD",
 
  236                                 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui", 
""));
 
  237                         $tpl->setVariable(
"CMD_FORGOT_USERNAME",
 
  238                                 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui", 
"showUsernameAssistanceForm"));
 
  239                         $tpl->setVariable(
"LANG_ID", 
$_GET[
"lang"]);
 
  240                         $tpl->parseCurrentBlock();
 
  243                 if ($ilSetting->get(
"pub_section"))
 
  245                         $tpl->setCurrentBlock(
"homelink");
 
  246                         $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".
$_GET[
"lang"]);
 
  247                         $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
 
  248                         $tpl->parseCurrentBlock();
 
  251                 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
 
  253                         $tpl->setCurrentBlock(
"client_list");
 
  254                         $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
 
  255                         $tpl->setVariable(
"CMD_CLIENT_LIST",
 
  256                                 $this->ctrl->getLinkTarget($this, 
"showClientList"));
 
  257                         $tpl->parseCurrentBlock();
 
  261                 if ($ilSetting->get(
"shib_active"))
 
  264                         if($ilSetting->get(
"shib_hos_type") == 
'external_wayf'){
 
  265                                 $tpl->setCurrentBlock(
"shibboleth_login");
 
  266                                 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
 
  267                                 $tpl->setVariable(
"IL_TARGET", 
$_GET[
"target"]);
 
  268                                 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
 
  269                                 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", $ilSetting->get(
"shib_login_button"));
 
  270                                         $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", sprintf($lng->txt(
"shib_general_login_instructions"),$ilSetting->get(
"shib_federation_name")).
' <a href="mailto:'.$ilias->getSetting(
"admin_email").
'">ILIAS '. $lng->txt(
"administrator").
'</a>.');
 
  271                                 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",  $ilSetting->get(
"shib_login_instructions"));
 
  272                                 $tpl->parseCurrentBlock();
 
  273                         } elseif($ilSetting->get(
"shib_hos_type") == 
'embedded_wayf') {
 
  274                                 $tpl->setCurrentBlock(
"shibboleth_custom_login");
 
  275                                 $customInstructions = stripslashes( $ilSetting->get(
"shib_login_instructions"));
 
  276                                 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
 
  277                                 $tpl->parseCurrentBlock();
 
  279                                 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
 
  280                                 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
 
  281                                 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
 
  282                                 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf($lng->txt(
"shib_select_home_organization"), $ilSetting->get(
"shib_federation_name")));
 
  283                                 $tpl->setVariable(
"TXT_CONTINUE", $lng->txt(
"btn_next"));
 
  284                                 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", $lng->txt(
"shib_home_organization"));
 
  285                                 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", $lng->txt(
"shib_general_wayf_login_instructions").
' <a href="mailto:'.$ilias->getSetting(
"admin_email").
'">ILIAS '. $lng->txt(
"administrator").
'</a>.');
 
  286                                 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
 
  287                                 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
 
  288                                 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
 
  289                                 $tpl->setVariable(
"ILW_TARGET", 
$_GET[
"target"]);
 
  290                                 $tpl->parseCurrentBlock();
 
  295                 if ($ilSetting->get(
"cas_active"))
 
  297                         $tpl->setCurrentBlock(
"cas_login");
 
  298                         $tpl->setVariable(
"TXT_CAS_LOGIN", $lng->txt(
"login_to_ilias_via_cas"));
 
  300                         $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", $ilSetting->get(
"cas_login_instructions"));
 
  301                         $this->ctrl->setParameter($this, 
"forceCASLogin", 
"1");
 
  302                         $tpl->setVariable(
"TARGET_CAS_LOGIN",
 
  303                                 $this->ctrl->getLinkTarget($this, 
"showLogin"));
 
  304                         $this->ctrl->setParameter($this, 
"forceCASLogin", 
"");
 
  305                         $tpl->parseCurrentBlock();
 
  312                         $ilSetting->get(
"shib_auth_allow_local")) &&
 
  313                         $ilSetting->get(
"auth_mode") != 
AUTH_CAS)
 
  315                         $loginSettings = 
new ilSetting(
"login_settings");
 
  316                         if (
$_GET[
"lang"] == 
false)
 
  318                                 $information = $loginSettings->get(
"login_message_".$lng->getDefaultLanguage());                                                        
 
  322                                 $information = $loginSettings->get(
"login_message_".
$_GET[
"lang"]);     
 
  325                         if(strlen(trim($information)))
 
  327                                 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
 
  330                         include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  332                         $form->setOpenTag(
false);
 
  333                         $form->setCloseTag(
false);
 
  334                         $form->setTitle($lng->txt(
"login_to_ilias"));
 
  337                         include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
 
  345                                         $radg->addOption($op1);
 
  346                                         if (isset($option[
'checked']))
 
  348                                                 $radg->setValue($key);
 
  352                                 $form->addItem($radg);
 
  365                         $form->addCommandButton(
"butSubmit", $lng->txt(
"log_in"));
 
  366                         $tpl->setVariable(
"LOGIN_FORM", $form->getHTML());
 
  368                         $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
 
  369                         $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
 
  370                         $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
 
  371                         if (isset(
$_POST[
"username"]))
 
  375                         $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
 
  376                         $tpl->parseCurrentBlock();
 
  382                 $tpl->setVariable(
"ILIAS_RELEASE", $ilSetting->get(
"ilias_version"));
 
  384                 if (isset(
$_GET[
'forceShoppingCartRedirect']))
 
  386                         $this->ctrl->setParameter($this, 
'forceShoppingCartRedirect', 1);
 
  389                 $this->ctrl->setTargetScript(
"login.php");
 
  390                 $tpl->setVariable(
"FORMACTION",
 
  391                         $this->ctrl->getFormAction($this));
 
  393                 $tpl->setVariable(
"LANG_FORM_ACTION",
 
  394                         $this->ctrl->getFormAction($this));
 
  395                 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
 
  396                 $tpl->setVariable(
"LANG_ID", 
$_GET[
"lang"]);
 
  398                 if (isset(
$_GET[
'inactive']) && 
$_GET[
'inactive'])
 
  402                 else if (isset(
$_GET[
'expired']) && 
$_GET[
'expired'])
 
  404                         $this->
showFailure($lng->txt(
"err_session_expired"));
 
  406                 else if (isset(
$_GET[
'login_to_purchase_object']) && 
$_GET[
'login_to_purchase_object'])
 
  408                         $lng->loadLanguageModule(
'payment');
 
  409                         $this->
showFailure($lng->txt(
"payment_login_to_buy_object"));
 
  411                 else if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
 
  413                         $lng->loadLanguageModule(
'registration');
 
  414                         if(
$_GET[
'reg_confirmation_msg'] == 
'reg_account_confirmation_successful')
 
  419                 elseif(isset(
$_GET[
'reached_session_limit']) && 
$_GET[
'reached_session_limit'])
 
  421                         $this->
showFailure($lng->txt(
"reached_session_limit"));
 
  425                 $status = $ilAuth->getStatus();
 
  427                 if ($status == 
"" && isset(
$_GET[
"auth_stat"]))
 
  429                         $status = 
$_GET[
"auth_stat"];
 
  431                 $auth_error = $ilias->getAuthError();
 
  438                                         $this->
showFailure($lng->txt(
"err_session_expired"));
 
  446                                         $this->
showFailure($lng->txt(
"err_auth_cas_no_ilias_user"));
 
  450                                         $this->
showFailure($lng->txt(
"err_auth_soap_no_ilias_user"));
 
  454                                         $this->
showFailure($lng->txt(
"err_auth_ldap_no_ilias_user"));
 
  458                                         $this->
showFailure($lng->txt(
"err_auth_radius_no_ilias_user"));
 
  462                                         $this->
showFailure($lng->txt(
"err_auth_mode_inactive"));
 
  466                                         $this->
showFailure($lng->txt(
"err_auth_apache_failed"));
 
  472                                         if (is_object($auth_error))
 
  474                                                 $add = 
"<br>".$auth_error->getMessage();
 
  476                                         $this->
showFailure($lng->txt(
"err_wrong_login").$add);
 
  482                 if (isset(
$_GET[
'time_limit']) && 
$_GET[
'time_limit'])
 
  484                         $this->
showFailure($lng->txt(
"time_limit_reached"));
 
  488                 if (isset(
$_GET[
'wrong_ip']) && 
$_GET[
'wrong_ip'])
 
  490                         $this->
showFailure($lng->txt(
"wrong_ip_detected").
" (".$_SERVER[
"REMOTE_ADDR"].
")");
 
  494                 if (isset(
$_GET[
'simultaneous_login']) && 
$_GET[
'simultaneous_login'])
 
  496                         $this->
showFailure($lng->txt(
"simultaneous_login_detected"));
 
  499                 $this->ctrl->setTargetScript(
"ilias.php");
 
  500                 $tpl->setVariable(
"PHP_SELF", $_SERVER[
'PHP_SELF']);
 
  501                 $tpl->setVariable(
"USER_AGREEMENT", $lng->txt(
"usr_agreement"));
 
  502                 $tpl->setVariable(
"LINK_USER_AGREEMENT",
 
  503                         $this->ctrl->getLinkTarget($this, 
"showUserAgreement"));
 
  506                 if (isset(
$_GET[
'cookies']) && 
$_GET[
'cookies'] == 
'nocookies')
 
  509                         $tpl->setVariable(
"COOKIES_HOWTO", $lng->txt(
"cookies_howto"));
 
  510                         $tpl->setVariable(
"LINK_NO_COOKIES",
 
  511                                 $this->ctrl->getLinkTarget($this, 
"showNoCookiesScreen"));
 
  514                 $tpl->show(
"DEFAULT", 
false);
 
  521                 $tpl->setCurrentBlock(
"warning");
 
  522                 $tpl->setVariable(
'TXT_MSG_LOGIN_FAILED', $a_mess);
 
  523                 $tpl->setVariable(
"MESSAGE_HEADING", $lng->txt(
"failure_message"));
 
  524                 $tpl->setVariable(
"ALT_IMAGE", $lng->txt(
"icon").
" ".$lng->txt(
"failure_message"));
 
  526                 $tpl->parseCurrentBlock();
 
  533                 $tpl->setCurrentBlock(
'success');
 
  534                 $tpl->setVariable(
'TXT_MSG_LOGIN_SUCCESS', $a_mess);
 
  535                 $tpl->setVariable(
'MESSAGE_HEADING', $lng->txt(
'success_message'));
 
  536                 $tpl->setVariable(
'ALT_IMAGE', $lng->txt(
'icon').
' '.$lng->txt(
'success_message'));
 
  538                 $tpl->parseCurrentBlock();
 
  552                 $lng->loadLanguageModule(
'auth');
 
  553                 $tpl->addBlockFile(
"CONTENT", 
 
  555                         "tpl.login_account_migration.html",
 
  558                 include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  560                 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
 
  562                 $form->setTitle($lng->txt(
'auth_account_migration'));
 
  563                 $form->addCommandButton(
'migrateAccount', $lng->txt(
'save'));
 
  564                 $form->addCommandButton(
'showLogin', $lng->txt(
'cancel'));
 
  569                 $keep = 
new ilRadioOption($lng->txt(
'auth_account_migration_keep'),1,$lng->txt(
'auth_info_migrate'));
 
  573                 $user->setMaxLength(128);
 
  578                 $pass->setRetype(
false);
 
  580                 $pass->setMaxLength(128);
 
  581                 $keep->addSubItem(
$pass);
 
  582                 $rad->addOption($keep);
 
  584                 $new = 
new ilRadioOption($lng->txt(
'auth_account_migration_new'),2,$lng->txt(
'auth_info_add'));
 
  585                 $rad->addOption($new);
 
  587                 $form->addItem($rad);
 
  589                 $tpl->setVariable(
'MIG_FORM',$form->getHTML());
 
  591                 if(strlen($a_message))
 
  596                 $tpl->show(
'DEFAULT');          
 
  607                 global 
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
 
  609                 $lng->loadLanguageModule(
'auth');
 
  611                 if(!isset(
$_POST[
'account_migration']))
 
  617                 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
 
  623                 if(
$_POST[
'account_migration'] == 1)
 
  633                         include_once 
'./Services/Authentication/classes/class.ilAuthFactory.php';
 
  634                         include_once 
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
 
  655                                         $rbacadmin->assignUser((
int) $role,
$user->getId());
 
  660                         $ilLog->write(__METHOD__.
': Migrated '.
$_SESSION[
'tmp_external_account'].
' to ILIAS account '.
$user->getLogin().
'.');
 
  662                 elseif(
$_POST[
'account_migration'] == 2)
 
  670                                         include_once(
'Services/Database/classes/class.ilAuthContainerApache.php');
 
  672                                         $container->forceCreation(
true);
 
  681                                         include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
 
  683                                         $container->forceCreation(
true);
 
  692                                         include_once 
'./Services/Authentication/classes/class.ilAuthFactory.php';
 
  693                                         include_once 
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
 
  696                                         $container->forceCreation(
true);
 
  707                                         include_once 
'./Services/Authentication/classes/class.ilAuthFactory.php';
 
  708                                         include_once 
'./Services/OpenId/classes/class.ilAuthContainerOpenId.php';
 
  711                                         $container->forceCreation(
true);
 
  731                 if($ilSetting->get(
"chat_active"))
 
  733                         include_once 
"./Modules/Chat/classes/class.ilChatServerCommunicator.php";
 
  745                 $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.logout.html",
 
  748                 if ($ilSetting->get(
"pub_section"))
 
  750                         $tpl->setCurrentBlock(
"homelink");
 
  751                         $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
 
  752                         $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
 
  753                         $tpl->parseCurrentBlock();
 
  756                 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
 
  758                         $tpl->setCurrentBlock(
"client_list");
 
  759                         $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
 
  760                         $this->ctrl->setParameter($this, 
"client_id", 
$client_id);
 
  761                         $tpl->setVariable(
"CMD_CLIENT_LIST",
 
  762                                 $this->ctrl->getLinkTarget($this, 
"showClientList"));
 
  763                         $tpl->parseCurrentBlock();
 
  764                         $this->ctrl->setParameter($this, 
"client_id", 
"");
 
  767                 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"logout"));
 
  768                 $tpl->setVariable(
"TXT_LOGOUT_TEXT", $lng->txt(
"logout_text"));
 
  769                 $tpl->setVariable(
"TXT_LOGIN", $lng->txt(
"login_to_ilias"));
 
  770                 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
 
  783                 $valid = $ilAuth->getValidationData();
 
  785                 $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.user_mapping_selection.html",
 
  795                 include_once(
'./Services/User/classes/class.ilObjUser.php');
 
  796                 if (count($email_user) == 1)
 
  799                         $tpl->setCurrentBlock(
"one_user");
 
  800                         $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
 
  801                         $tpl->setVariable(
"VAL_USERNAME", current($email_user));
 
  802                         $tpl->setVariable(
"USER_ID", key($email_user));
 
  803                         $tpl->parseCurrentBlock();
 
  807                         foreach($email_user as $key => $login)
 
  809                                 $tpl->setCurrentBlock(
"user");
 
  810                                 $tpl->setVariable(
"USR_ID", $key);
 
  811                                 $tpl->setVariable(
"VAL_USER", $login);
 
  812                                 $tpl->parseCurrentBlock();
 
  814                         $tpl->setCurrentBlock(
"multpiple_user");
 
  815                         $tpl->parseCurrentBlock();
 
  818                 $tpl->setCurrentBlock(
"content");
 
  819                 $this->ctrl->setParameter($this, 
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
 
  820                 $this->ctrl->setParameter($this, 
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
 
  821                 $this->ctrl->setParameter($this, 
"auth_stat", 
$_GET[
"auth_stat"]);
 
  822                 $tpl->setVariable(
"FORMACTION",
 
  823                         $this->ctrl->getFormAction($this));
 
  824                 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
 
  825                 if (count($email_user) == 1)
 
  827                         $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation"));
 
  828                         $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_2"));
 
  832                         $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation_3"));
 
  833                         $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_4"));
 
  835                 $tpl->setVariable(
"TXT_CREATE_USER", $lng->txt(
"ums_create_new_account"));
 
  836                 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
 
  838                 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"login"));
 
  850                 if (!$ilIliasIniFile->readVariable(
"clients",
"list"))
 
  856                 $tpl = 
new ilTemplate(
"tpl.main.html", 
true, 
true);
 
  859                 $tpl->setVariable(
"PAGETITLE",
"Client List");
 
  860                 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./templates/default/delos.css");
 
  863                 $tpl->addBlockfile(
"CONTENT", 
"content", 
"tpl.client_list.html",
 
  867                 $tpl->addBlockfile(
"CLIENT_LIST", 
"client_list", 
"tpl.table.html");
 
  870                 $tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.obj_tbl_rows.html");
 
  873                 require_once(
"setup/classes/class.ilClientList.php");
 
  874                 require_once(
"setup/classes/class.ilClient.php");
 
  875                 require_once(
"setup/classes/class.ilDBConnections.php");
 
  876                 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
  879                 $list = $clientlist->getClients();
 
  881                 if (count($list) == 0)
 
  883                         header(
"Location: ./setup/setup.php");
 
  887                 foreach ($list as $key => 
$client)
 
  890                         if (
$client->checkDatabaseExists() and 
$client->ini->readVariable(
"client",
"access") and 
$client->getSetting(
"setup_ok"))
 
  892                                 $this->ctrl->setParameter($this, 
"client_id", $key);
 
  905                                                                 "<a href=\"".
"repository.php?client_id=".urlencode($key).
"\">Start page</a>",
 
  906                                                                 "<a href=\"".
"login.php?cmd=force_login&client_id=".urlencode($key).
"\">Login page</a>" 
  910                 $this->ctrl->setParameter($this, 
"client_id", 
"");
 
  916                 $tbl->setTitle(
"Available Clients");
 
  917                 $tbl->setHeaderNames(array(
"Installation Name",
"Public Access",
"Login"));
 
  918                 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
 
  919                 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
 
  922                 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
 
  923                 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
  924                 $tbl->setLimit(
$_GET[
"limit"]);
 
  925                 $tbl->setOffset(
$_GET[
"offset"]);
 
  928                 $tbl->setData(
$data);
 
  931                 $tbl->setFooter(
"tblfooter");
 
  934                 $tbl->setStyle(
"table",
"std");
 
  936                 $tbl->disable(
"icon");
 
  937                 $tbl->disable(
"numinfo");
 
  938                 $tbl->disable(
"sort");
 
  942                 $tpl->show(
"DEFAULT", 
true, 
true);
 
  954                 $str = 
"<p style=\"margin:15px;\"> 
  955                         You need to enable Session Cookies in your Browser to use ILIAS. 
  958                         <br/>Tools -> Options -> Privacy -> Cookies 
  959                         <br/>Enable 'Allow sites to set cookies' and activate option 'Keep 
  960                         <br/>cookies' auf 'until I close Firefox' 
  962                         <br/><b>Mozilla/Netscape</b> 
  963                         <br/>Edit -> Preferences -> Privacy&Security -> Cookies 
  964                         <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current 
  967                         <br/><b>Internet Explorer</b> 
  968                         <br/>Tools -> Internet Options -> Privacy -> Advanced 
  969                         <br/>- Check 'Override automatic cookie handling' 
  970                         <br/>- Check 'Always allow session cookies' 
  972                 $tpl->setVariable(
"CONTENT", $str);
 
  991                 require_once 
"./Services/User/classes/class.ilUserAgreement.php";
 
  993                 $tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.view_usr_agreement.html",
 
  995                 $tpl->addBlockFile(
"STATUSLINE", 
"statusline", 
"tpl.statusline.html");
 
 1001                 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
 
 1002                 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
 
 1005                 $languages = $lng->getInstalledLanguages();
 
 1007                 $count = (int) round(count($languages) / 2);
 
 1010                 foreach ($languages as $lang_key)
 
 1012                         $tpl->setCurrentBlock(
"languages");
 
 1013                         $tpl->setVariable(
"LANG_VAL_CMD", $this->ctrl->getCmd());
 
 1014                         $tpl->setVariable(
"AGR_LANG_ACTION",
 
 1015                                 $this->ctrl->getFormAction($this));
 
 1016                         $tpl->setVariable(
"LANG_NAME",
 
 1018                         $tpl->setVariable(
"LANG_ICON", $lang_key);
 
 1019                         $tpl->setVariable(
"LANG_KEY", $lang_key);
 
 1020                         $tpl->setVariable(
"BORDER", 0);
 
 1021                         $tpl->setVariable(
"VSPACE", 0);
 
 1022                         $tpl->parseCurrentBlock();
 
 1026                 $tpl->setCurrentBlock(
"content");
 
 1029                 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"usr_agreement"));
 
 1030                 $tpl->setVariable(
"TXT_PAGETITLE", 
"ILIAS3 - ".$lng->txt(
"usr_agreement"));
 
 1033                 if ($this->ctrl->getCmd() == 
"getAcceptance")
 
 1035                         if (
$_POST[
"status"]==
"accepted")
 
 1037                                 $ilUser->writeAccepted();
 
 1040                         $tpl->setVariable(
"VAL_CMD", 
"getAcceptance");
 
 1041                         $tpl->setVariable(
"AGR_LANG_ACTION",
 
 1042                                 $this->ctrl->getFormAction($this));
 
 1043                         $tpl->setCurrentBlock(
"get_acceptance");
 
 1044                         $tpl->setVariable(
"FORM_ACTION",
 
 1045                                 $this->ctrl->getFormAction($this));
 
 1047                         $tpl->setVariable(
"ACCEPT_AGREEMENT", $lng->txt(
"accept_usr_agreement"));
 
 1048                         $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
 
 1049                         $tpl->parseCurrentBlock();
 
 1053                         $tpl->setCurrentBlock(
"back");
 
 1054                         $tpl->setVariable(
"BACK", $lng->txt(
"back"));
 
 1055                         $tpl->setVariable(
"LINK_BACK",
 
 1056                                 $this->ctrl->getLinkTargetByClass(
"ilstartupgui", 
"showLogin"));
 
 1057                         $tpl->parseCurrentBlock();
 
 1073                 if (!isset(
$_GET[
"client_id"]) &&
 
 1074                         $_GET[
"cmd"] == 
"" &&
 
 1075                         $ilIliasIniFile->readVariable(
"clients",
"list"))
 
 1107                         $start = 
"login.php";
 
 1117                 if ($ilSetting->get(
"pub_section") && 
$_POST[
"sendLogin"] != 
"1" 
 1118                         && ($ilAuth->getStatus() != -101 && 
$_GET[
"soap_pw"] == 
""))
 
 1123                         $_POST[
"username"] = 
"anonymous";
 
 1124                         $_POST[
"password"] = 
"anonymous";
 
 1126                         $oldSid = session_id();
 
 1129                         if (ANONYMOUS_USER_ID == 
"")
 
 1131                                 die (
"Public Section enabled, but no Anonymous user found.");
 
 1133                         if (!$ilAuth->getAuth())
 
 1135                                 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
 
 1138                         if(IS_PAYMENT_ENABLED)
 
 1140                                 $newSid = session_id();
 
 1141                                 include_once 
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
 
 1142                                 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
 
 1146                         $ilInit->initUserAccount();
 
 1168                 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID || !empty(
$_GET[
"ref_id"]))
 
 1172                         if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID && 
$_GET[
"target"] != 
"")
 
 1188                         if (empty(
$_GET[
"ref_id"]))
 
 1190                                 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
 
 1192                         $ilCtrl->initBaseClass(
"");
 
 1193                         $ilCtrl->setCmd(
"frameset");
 
 1194                         $start_script = 
"repository.php";
 
 1195                         include($start_script);
 
 1200                         if(IS_PAYMENT_ENABLED)
 
 1203                                 include_once 
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
 
 1210                                 if (
$_GET[
"target"] != 
"")
 
 1212                                         $tarr = explode(
"_", 
$_GET[
"target"]);
 
 1213                                         if ($tarr[0] != 
"pg" && $tarr[0] != 
"st" && $tarr[1] > 0)
 
 1221                                 #$ilCtrl->initBaseClass("ilPersonalDesktopGUI"); 
 1222                                 #$start_script = "ilias.php"; 
 1233                 include($start_script);
 
 1238                 global $objDefinition;
 
 1240                 if ($a_target == 
"")
 
 1245                 $t_arr = explode(
"_", 
$_GET[
"target"]);
 
 1253                 if ($type == 
"pg" | $type == 
"st")
 
 1258                 $class = $objDefinition->getClassName($type);
 
 1263                 $location = $objDefinition->getLocation($type);
 
 1264                 $full_class = 
"ilObj".$class.
"Access";
 
 1265                 include_once(
$location.
"/class.".$full_class.
".php");
 
 1267                 return call_user_func(array($full_class, 
"_checkGoto"),
 
 1277                 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
 
 1279                         ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
 
 1284                         require_once 
'Services/Registration/classes/class.ilRegistrationSettings.php';
 
 1289                         $oUser->setActive(
true);
 
 1290                         if($oRegSettings->passwordGenerationEnabled())
 
 1293                                 $password =  $passwd[0];                                
 
 1295                                 $oUser->setLastPasswordChangeTS( time() );                              
 
 1299                         if($lng->getLangKey() != $oUser->getPref(
'language'))
 
 1301                                 $lng = 
new ilLanguage($oUser->getPref(
'language'));
 
 1306                         include_once(
"Services/Mail/classes/class.ilAccountMail.php");
 
 1307                         include_once 
'./Services/User/classes/class.ilObjUserFolder.php';
 
 1309                         if (trim($amail[
"body"]) != 
"" && trim($amail[
"subject"]) != 
"")
 
 1312                     $acc_mail->setUser($oUser);
 
 1313                     if($oRegSettings->passwordGenerationEnabled())
 
 1315                         $acc_mail->setUserPassword($password);
 
 1321                                 include_once 
'Services/Mail/classes/class.ilMail.php';
 
 1322                                 $mail_obj = 
new ilMail(ANONYMOUS_USER_ID);                      
 
 1325                                 $subject = $lng->txt(
"reg_mail_subject");
 
 1328                                 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
 
 1329                                         $lng->txt(
"reg_mail_body_text1").
"\n\n".
 
 1330                                         $lng->txt(
"reg_mail_body_text2").
"\n".
 
 1331                                         ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";                 
 
 1332                                 $body .= $lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
 
 1334                                 if($oRegSettings->passwordGenerationEnabled())
 
 1336                                         $body.= $lng->txt(
"passwd").
": ".$password.
"\n";
 
 1340                                 $body.= $lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
 
 1344                                 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
 
 1345                                 $body .= $oUser->getProfileAsString($lng);
 
 1346                                 $mail_obj->enableSoap(
false);
 
 1347                                 $mail_obj->appendInstallationSignature(
true);
 
 1348                                 $mail_obj->sendMail($oUser->getEmail(), 
'', 
'',
 
 1351                                         array(), array(
'normal'));
 
 1354                         ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful');
 
 1358                         include_once 
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';                        
 
 1360                         $soap_client->setTimeout(1);
 
 1361                         $soap_client->setResponseTimeout(1);
 
 1362                         $soap_client->enableWSDL(
true);
 
 1363                         $soap_client->init();
 
 1365                         $ilLog->write(__METHOD__.
': Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
 
 1369                                 'deleteExpiredDualOptInUserObjects',
 
 1373                                         $exception->getCode() 
 
 1377                         ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
 
 1381                         ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
 
 1393                 include_once 
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
 
 1399                 $lng->loadLanguageModule(
'auth');
 
 1401                 include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1403                 $form->setFormAction($this->ctrl->getFormAction($this,
'login'));
 
 1404                 $form->setTitle($lng->txt(
'login_to_ilias_via_openid'));
 
 1406                 $openid = 
new ilTextInputGUI($lng->txt(
'auth_openid_login'),
'oid_username');
 
 1408                 $openid->setMaxLength(255);
 
 1409                 $openid->setRequired(
true);
 
 1410                 $openid->setCssClass(
'ilOpenIDBox');
 
 1411                 $openid->setInfo($lng->txt(
'auth_openid_login_info_a'));
 
 1412                 $form->addItem($openid);
 
 1414                 include_once 
'./Services/OpenId/classes/class.ilOpenIdProviders.php';
 
 1415                 $pro = 
new ilSelectInputGUI($lng->txt(
'auth_openid_provider'),
'oid_provider');
 
 1418                 $form->addItem($pro);
 
 1421                 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
 
 1423                 $tpl->setVariable(
'OID_LOGIN_FORM',$form->getHTML());