4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
27 $ilCtrl->saveParameter($this, array(
"rep_ref_id",
"lang",
"target",
"client_id"));
37 $cmd = $this->ctrl->getCmd(
"processIndexPHP",array(
'processIndexPHP',
'showLogin'));
38 $ilLog->write(__METHOD__.
' cmd = '.
$cmd);
39 $next_class = $this->ctrl->getNextClass($this);
43 case 'ilLoginPageGUI':
46 case "ilaccountregistrationgui":
47 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
50 case "ilpasswordassistancegui":
51 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
64 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
65 $this->ctrl->setCmd(
"");
74 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
75 $this->ctrl->setCmd(
"");
88 $status = $ilAuth->getStatus();
89 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
91 $status =
$_GET[
"auth_stat"];
94 if($ilAuth->getAuth() && !$status)
97 if (
$_GET[
"rep_ref_id"] !=
"")
101 $this->processStartingPage();
115 if (empty(
$_GET[
'cookies']))
117 $additional_params =
'';
119 if(IS_PAYMENT_ENABLED)
123 $additional_params .=
'&login_to_purchase_object=1&forceShoppingCartRedirect=1';
129 "&ext_uid=".
$_GET[
"ext_uid"].
"&cookies=nocookies&client_id=".
130 rawurlencode(CLIENT_ID).
"&lang=".$lng->getLangKey().$additional_params);
139 unset(
$_GET[
'cookies']);
142 if ($ilSetting->get(
"shib_active") && $ilSetting->get(
"shib_hos_type"))
144 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
149 if (isset($WAYF) && $WAYF->is_selection())
151 if ($WAYF->is_valid_selection())
154 $WAYF->setSAMLCookie();
163 if(IS_PAYMENT_ENABLED)
165 if(isset(
$_GET[
'forceShoppingCartRedirect']) && (
int)
$_GET[
'forceShoppingCartRedirect'] == 1)
167 $this->ctrl->setParameter($this,
'forceShoppingCartRedirect', 1);
171 if (isset(
$_GET[
'login_to_purchase_object']) &&
$_GET[
'login_to_purchase_object'])
173 $lng->loadLanguageModule(
'payment');
174 $failure = $lng->txt(
"payment_login_to_buy_object");
180 if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
182 $lng->loadLanguageModule(
'registration');
183 if(
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful')
192 else if(isset(
$_GET[
'reached_session_limit']) &&
$_GET[
'reached_session_limit'])
194 $failure = $lng->txt(
"reached_session_limit");
196 else if(isset(
$_GET[
'accdel']) &&
$_GET[
'accdel'])
198 $lng->loadLanguageModule(
'user');
199 $failure = $lng->txt(
"user_account_deleted_confirmation");
212 $failure = $lng->txt(
"err_session_expired");
216 $failure = $lng->txt(
"err_auth_cas_no_ilias_user");
220 $failure = $lng->txt(
"err_auth_soap_no_ilias_user");
224 $failure = $lng->txt(
"err_auth_ldap_no_ilias_user");
228 $failure = $lng->txt(
"err_auth_radius_no_ilias_user");
232 $failure = $lng->txt(
"err_auth_mode_inactive");
236 $failure = $lng->txt(
"err_auth_apache_failed");
240 $lng->loadLanguageModule(
'cptch');
244 $failure = $lng->txt(
"cptch_wrong_input");
255 $failure = $lng->txt(
"wrong_ip_detected").
" (".$_SERVER[
"REMOTE_ADDR"].
")";
263 $failure = $lng->txt(
"simultaneous_login_detected");
268 $username = $ilAuth->getExceededUserName();
272 if($ilSetting->get(
'user_reactivate_code'))
279 $failure = $lng->txt(
"time_limit_reached");
287 $failure = $lng->txt(
"err_inactive");
296 $auth_error = $ilias->getAuthError();
297 if (is_object($auth_error))
299 $add =
"<br>".$auth_error->getMessage();
301 $failure = $lng->txt(
"err_wrong_login").$add;
308 $lng->loadLanguageModule(
"auth");
309 $success = $lng->txt(
"auth_account_code_used");
316 self::initStartUpTemplate(
"tpl.login.html");
335 $page_editor_html = $this->showTermsOfServiceLink($page_editor_html);
343 $tpl->setVariable(
"PAGETITLE", $lng->txt(
"startpage"));
344 $tpl->setVariable(
"ILIAS_RELEASE", $ilSetting->get(
"ilias_version"));
346 $this->ctrl->setTargetScript(
"ilias.php");
347 $tpl->setVariable(
"PHP_SELF", $_SERVER[
'PHP_SELF']);
350 if (isset(
$_GET[
'cookies']) &&
$_GET[
'cookies'] ==
'nocookies')
355 if(strlen($page_editor_html))
357 $tpl->setVariable(
'LPE',$page_editor_html);
360 $tpl->fillCssFiles();
361 $tpl->fillJavaScriptFiles();
363 $tpl->show(
"DEFAULT",
false);
370 self::initStartUpTemplate(
"tpl.login_reactivate_code.html");
379 $tpl->setVariable(
"FORM", $a_form->getHTML());
380 $tpl->show(
"DEFAULT",
false);
387 $lng->loadLanguageModule(
"auth");
389 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
392 $form->setFormAction($ilCtrl->getFormAction($this,
'showcodeform'));
393 $form->setTitle($lng->txt(
'auth_account_code_title'));
395 $count =
new ilTextInputGUI($lng->txt(
'auth_account_code'),
'code');
397 $count->setInfo($lng->txt(
'auth_account_code_info'));
398 $form->addItem($count);
402 $uname->setValue($a_username);
403 $form->addItem($uname);
405 $form->addCommandButton(
'processCode', $lng->txt(
'send'));
417 if($uname && $form->checkInput())
419 $code = $form->getInput(
"code");
421 include_once
"Services/User/classes/class.ilAccountCode.php";
432 $invalid_code =
false;
435 if($valid_until ===
"0")
437 $user->setTimeLimitUnlimited(
true);
441 if(is_numeric($valid_until))
443 $valid_until = strtotime(
"+".$valid_until.
"days");
447 $valid_until = explode(
"-", $valid_until);
448 $valid_until = mktime(23, 59, 59, $valid_until[1],
449 $valid_until[2], $valid_until[0]);
450 if($valid_until < time())
452 $invalid_code =
true;
458 $user->setTimeLimitUnlimited(
false);
459 $user->setTimeLimitUntil($valid_until);
465 $user->setActive(
true);
477 $ilCtrl->setParameter($this,
"cu", 1);
478 $ilCtrl->redirect($this,
"showLogin");
482 $lng->loadLanguageModule(
"user");
483 $field = $form->getItemByPostVar(
"code");
484 $field->setAlert($lng->txt(
"user_account_code_not_valid"));
487 $form->setValuesByPost();
507 $ilSetting->get(
"shib_auth_allow_local")) &&
508 $ilSetting->get(
"auth_mode") !=
AUTH_CAS)
510 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
513 $form->setFormAction($this->ctrl->getFormAction($this,
''));
514 $form->setName(
"formlogin");
515 $form->setShowTopButtons(
false);
516 $form->setTitle($lng->txt(
"login_to_ilias"));
519 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
523 $visible_auth_methods = array();
527 if(isset($option[
'hide_in_ui']) && $option[
'hide_in_ui'])
533 $radg->addOption($op1);
534 if (isset($option[
'checked']))
536 $radg->setValue($key);
538 $visible_auth_methods[] = $op1;
541 if(count($visible_auth_methods) == 1)
543 $first_auth_method = current($visible_auth_methods);
545 $hidden_auth_method->setValue($first_auth_method->getValue());
546 $form->addItem($hidden_auth_method);
550 $form->addItem($radg);
556 $ti->setRequired(
true);
562 $pi->setDisableHtmlAutoComplete(
false);
563 $pi->setRequired(
true);
565 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
567 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
568 if(ilCaptchaUtil::isActiveForLogin())
570 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
573 $form->addItem($captcha);
585 return $page_editor_html;
597 if(strlen($page_editor_html))
600 return $page_editor_html;
603 $loginSettings =
new ilSetting(
"login_settings");
604 $information = $loginSettings->get(
"login_message_".$lng->getLangKey());
606 if(strlen(trim($information)))
608 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
610 return $page_editor_html;
625 if ($ilSetting->get(
"cas_active"))
627 $tpl =
new ilTemplate(
'tpl.login_form_cas.html',
true,
true,
'Services/Init');
628 $tpl->setVariable(
"TXT_CAS_LOGIN", $lng->txt(
"login_to_ilias_via_cas"));
630 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", $ilSetting->get(
"cas_login_instructions"));
631 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
632 $tpl->setVariable(
"TARGET_CAS_LOGIN",$this->ctrl->getLinkTarget($this,
"showLogin"));
633 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
639 '[list-cas-login-form]',
643 return $page_editor_html;
659 if ($ilSetting->get(
"shib_active")) {
660 $tpl =
new ilTemplate(
'tpl.login_form_shibboleth.html',
true,
true,
'Services/Init');
662 $tpl->setVariable(
'SHIB_FORMACTION',
'./shib_login.php');
664 if ($ilSetting->get(
"shib_hos_type") ==
'external_wayf') {
665 $tpl->setCurrentBlock(
"shibboleth_login");
666 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
667 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
668 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
669 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", $ilSetting->get(
"shib_login_button"));
670 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", sprintf($lng->txt(
"shib_general_login_instructions"), $ilSetting->get(
"shib_federation_name")) .
' <a href="mailto:' . $ilSetting->get(
"admin_email") .
'">ILIAS ' . $lng->txt(
"administrator") .
'</a>.');
671 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
672 $tpl->parseCurrentBlock();
673 } elseif ($ilSetting->get(
"shib_hos_type") ==
'embedded_wayf') {
674 $tpl->setCurrentBlock(
"shibboleth_custom_login");
675 $customInstructions = stripslashes($ilSetting->get(
"shib_login_instructions"));
676 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
677 $tpl->parseCurrentBlock();
679 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
680 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
681 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
682 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf($lng->txt(
"shib_select_home_organization"), $ilSetting->get(
"shib_federation_name")));
683 $tpl->setVariable(
"TXT_CONTINUE", $lng->txt(
"btn_next"));
684 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", $lng->txt(
"shib_home_organization"));
685 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", $lng->txt(
"shib_general_wayf_login_instructions") .
' <a href="mailto:' . $ilSetting->get(
"admin_email") .
'">ILIAS ' . $lng->txt(
"administrator") .
'</a>.');
686 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
688 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
691 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
692 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
693 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
694 $tpl->parseCurrentBlock();
700 return $page_editor_html;
715 if(!strlen($page_editor_html))
717 $tpl->setVariable($fallback_tplvar,$element_html);
718 return $page_editor_html;
721 if(!stristr($page_editor_html, $placeholder))
723 $tpl->setVariable($fallback_tplvar,$element_html);
724 return $page_editor_html;
726 return str_replace($placeholder, $element_html, $page_editor_html);
737 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
739 $active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
747 include_once
'./Services/COPage/classes/class.ilPageUtil.php';
753 include_once
'./Services/Authentication/classes/class.ilLoginPage.php';
754 include_once
'./Services/Authentication/classes/class.ilLoginPageGUI.php';
756 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
758 $tpl->setCurrentBlock(
"SyntaxStyle");
760 $tpl->parseCurrentBlock();
765 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
766 $page_gui->setStyleId(0,
'auth');
768 $page_gui->setPresentationTitle(
"");
769 $page_gui->setTemplateOutput(
false);
770 $page_gui->setHeader(
"");
771 $ret = $page_gui->showPage();
788 $rtpl =
new ilTemplate(
'tpl.login_registration_links.html',
true,
true,
'Services/Init');
791 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
794 $rtpl->setCurrentBlock(
"new_registration");
795 $rtpl->setVariable(
"REGISTER", $lng->txt(
"registration"));
796 $rtpl->setVariable(
"CMD_REGISTER",
797 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
""));
798 $rtpl->parseCurrentBlock();
801 if ($ilSetting->get(
"password_assistance"))
803 $rtpl->setCurrentBlock(
"password_assistance");
804 $rtpl->setVariable(
"FORGOT_PASSWORD", $lng->txt(
"forgot_password"));
805 $rtpl->setVariable(
"FORGOT_USERNAME", $lng->txt(
"forgot_username"));
806 $rtpl->setVariable(
"CMD_FORGOT_PASSWORD",
807 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
""));
808 $rtpl->setVariable(
"CMD_FORGOT_USERNAME",
809 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm"));
810 $rtpl->setVariable(
"LANG_ID", $lng->getLangKey());
811 $rtpl->parseCurrentBlock();
814 if ($ilSetting->get(
"pub_section") &&
815 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", ROOT_FOLDER_ID))
817 $rtpl->setCurrentBlock(
"homelink");
818 $rtpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".$lng->getLangKey());
819 $rtpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
820 $rtpl->parseCurrentBlock();
823 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
825 $rtpl->setCurrentBlock(
"client_list");
826 $rtpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
827 $rtpl->setVariable(
"CMD_CLIENT_LIST",$this->ctrl->getLinkTarget($this,
"showClientList"));
828 $rtpl->parseCurrentBlock();
835 '[list-registration-link]',
836 'REG_PWD_CLIENT_LINKS'
845 protected function showTermsOfServiceLink($page_editor_html)
855 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
858 $utpl =
new ilTemplate(
'tpl.login_terms_of_service_link.html',
true,
true,
'Services/Init');
859 $utpl->setVariable(
'TXT_TERMS_OF_SERVICE', $lng->txt(
'usr_agreement'));
860 $utpl->setVariable(
'LINK_TERMS_OF_SERVICE', $this->ctrl->getLinkTarget($this,
'showTermsOfService'));
866 '[list-user-agreement]',
879 '[list-user-agreement]',
893 '[list-language-selection] ',
894 '[list-registration-link]',
895 '[list-user-agreement]',
897 '[list-cas-login-form]',
898 '[list-shibboleth-login-form]',
899 '[list-openid-login-form]'
901 array(
'',
'',
'',
'',
'',
'',
''),
910 public function showAccountMigration($a_message =
'')
918 $lng->loadLanguageModule(
'auth');
919 self::initStartUpTemplate(
'tpl.login_account_migration.html');
921 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
923 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
925 $form->setTitle($lng->txt(
'auth_account_migration'));
926 $form->addCommandButton(
'migrateAccount', $lng->txt(
'save'));
927 $form->addCommandButton(
'showLogin', $lng->txt(
'cancel'));
932 $keep =
new ilRadioOption($lng->txt(
'auth_account_migration_keep'),1,$lng->txt(
'auth_info_migrate'));
934 $user->setRequired(
true);
937 $user->setMaxLength(128);
941 $pass->setRetype(
false);
942 $pass->setRequired(
true);
945 $pass->setMaxLength(128);
946 $keep->addSubItem(
$pass);
947 $rad->addOption($keep);
949 $new =
new ilRadioOption($lng->txt(
'auth_account_migration_new'),2,$lng->txt(
'auth_info_add'));
950 $rad->addOption($new);
952 $form->addItem($rad);
954 $tpl->setVariable(
'MIG_FORM',$form->getHTML());
956 if(strlen($a_message))
961 $tpl->show(
'DEFAULT');
972 global
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
974 $lng->loadLanguageModule(
'auth');
976 if(!isset(
$_POST[
'account_migration']))
978 $this->showAccountMigration($lng->txt(
'err_choose_migration_type'));
982 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
984 $this->showAccountMigration($lng->txt(
'err_wrong_login'));
988 if(
$_POST[
'account_migration'] == 1)
992 $this->showAccountMigration($lng->txt(
'err_wrong_login'));
998 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
999 include_once
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
1003 if(!$ilAuth->checkAuth())
1006 $this->showAccountMigration($lng->txt(
'err_wrong_login'));
1012 $user->setExternalAccount(
ilSession::get(
'tmp_external_account'));
1013 $user->setActive(
true);
1021 $rbacadmin->assignUser((
int) $role,$user->getId());
1026 $ilLog->write(__METHOD__.
': Migrated '.
ilSession::get(
'tmp_external_account').
' to ILIAS account '.$user->getLogin().
'.');
1028 elseif(
$_POST[
'account_migration'] == 2)
1036 include_once(
'Services/AuthApache/classes/class.ilAuthContainerApache.php');
1038 $container->forceCreation(
true);
1047 include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
1049 $container->forceCreation(
true);
1058 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1059 include_once
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
1062 $container->forceCreation(
true);
1074 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1075 include_once
'./Services/OpenId/classes/class.ilAuthContainerOpenId.php';
1078 $container->forceCreation(
true);
1080 include_once
'./Services/OpenId/classes/class.ilAuthOpenId.php';
1090 ilUtil::redirect(
"ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&target=".
$_GET[
"target"].
"&cmd=getAcceptance");
1112 self::initStartUpTemplate(
"tpl.logout.html");
1114 if ($ilSetting->get(
"pub_section"))
1116 $tpl->setCurrentBlock(
"homelink");
1117 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".$lng->getLangKey());
1118 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
1119 $tpl->parseCurrentBlock();
1122 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
1124 $tpl->setCurrentBlock(
"client_list");
1125 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
1126 $this->ctrl->setParameter($this,
"client_id",
$client_id);
1127 $tpl->setVariable(
"CMD_CLIENT_LIST",
1128 $this->ctrl->getLinkTarget($this,
"showClientList"));
1129 $tpl->parseCurrentBlock();
1130 $this->ctrl->setParameter($this,
"client_id",
"");
1133 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"logout"));
1134 $tpl->setVariable(
"TXT_LOGOUT_TEXT", $lng->txt(
"logout_text"));
1135 $tpl->setVariable(
"TXT_LOGIN", $lng->txt(
"login_to_ilias"));
1136 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".$lng->getLangKey());
1149 $valid = $ilAuth->getValidationData();
1151 self::initStartUpTemplate(
"tpl.user_mapping_selection.html");
1160 include_once(
'./Services/User/classes/class.ilObjUser.php');
1161 if (count($email_user) == 1)
1164 $tpl->setCurrentBlock(
"one_user");
1165 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
1166 $tpl->setVariable(
"VAL_USERNAME", current($email_user));
1167 $tpl->setVariable(
"USER_ID", key($email_user));
1168 $tpl->parseCurrentBlock();
1172 foreach($email_user as $key => $login)
1174 $tpl->setCurrentBlock(
"user");
1175 $tpl->setVariable(
"USR_ID", $key);
1176 $tpl->setVariable(
"VAL_USER", $login);
1177 $tpl->parseCurrentBlock();
1179 $tpl->setCurrentBlock(
"multpiple_user");
1180 $tpl->parseCurrentBlock();
1183 $tpl->setCurrentBlock(
"content");
1184 $this->ctrl->setParameter($this,
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
1185 $this->ctrl->setParameter($this,
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
1186 $this->ctrl->setParameter($this,
"auth_stat",
$_GET[
"auth_stat"]);
1187 $tpl->setVariable(
"FORMACTION",
1188 $this->ctrl->getFormAction($this));
1189 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
1190 if (count($email_user) == 1)
1192 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation"));
1193 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_2"));
1197 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation_3"));
1198 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_4"));
1200 $tpl->setVariable(
"TXT_CREATE_USER", $lng->txt(
"ums_create_new_account"));
1201 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
1203 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"login"));
1215 if (!$ilIliasIniFile->readVariable(
"clients",
"list"))
1221 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1222 $tpl->setAddFooter(
false);
1225 $tpl->setVariable(
"PAGETITLE",
"Client List");
1226 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./templates/default/delos.css");
1229 self::initStartUpTemplate(
"tpl.client_list.html");
1232 $tpl->addBlockfile(
"CLIENT_LIST",
"client_list",
"tpl.table.html");
1235 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
1238 require_once(
"setup/classes/class.ilClientList.php");
1239 require_once(
"setup/classes/class.ilClient.php");
1240 require_once(
"setup/classes/class.ilDBConnections.php");
1241 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1244 $list = $clientlist->getClients();
1246 if (count($list) == 0)
1248 header(
"Location: ./setup/setup.php");
1252 $hasPublicSection =
false;
1253 foreach ($list as $key =>
$client)
1257 if (
$client->checkDatabaseExists(
true) and
$client->ini->readVariable(
"client",
"access") and
$client->getSetting(
"setup_ok"))
1259 $this->ctrl->setParameter($this,
"client_id", $key);
1262 $tmp[] =
"<a href=\"".
"login.php?cmd=force_login&client_id=".urlencode($key).
"\">Login page</a>";
1264 if(
$client->getSetting(
'pub_section'))
1266 $hasPublicSection =
true;
1267 $tmp[] =
"<a href=\"" .
"ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode($key) .
"\">Start page</a>";
1282 if($hasPublicSection)
1284 $tbl->setTitle(
"Available Clients");
1285 $tbl->setHeaderNames(array(
"Installation Name",
"Login",
"Public Access"));
1286 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
1287 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
1291 $tbl->setTitle(
"Available Clients");
1292 $tbl->setHeaderNames(array(
"Installation Name",
"Login",
''));
1293 $tbl->setHeaderVars(array(
"name",
"login",
''));
1294 $tbl->setColumnWidth(array(
"70%",
"25%",
'1px'));
1298 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
1299 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1300 $tbl->setLimit(
$_GET[
"limit"]);
1301 $tbl->setOffset(
$_GET[
"offset"]);
1304 $tbl->setData($data);
1306 $tbl->disable(
"icon");
1307 $tbl->disable(
"numinfo");
1308 $tbl->disable(
"sort");
1309 $tbl->disable(
"footer");
1313 $tpl->show(
"DEFAULT",
true,
true);
1325 $str =
"<p style=\"margin:15px;\">
1326 You need to enable Session Cookies in your Browser to use ILIAS.
1329 <br/>Tools -> Options -> Privacy -> Cookies
1330 <br/>Enable 'Allow sites to set cookies' and activate option 'Keep
1331 <br/>cookies' auf 'until I close Firefox'
1333 <br/><b>Mozilla/Netscape</b>
1334 <br/>Edit -> Preferences -> Privacy&Security -> Cookies
1335 <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current
1338 <br/><b>Internet Explorer</b>
1339 <br/>Tools -> Internet Options -> Privacy -> Advanced
1340 <br/>- Check 'Override automatic cookie handling'
1341 <br/>- Check 'Always allow session cookies'
1343 $tpl->setVariable(
"CONTENT", $str);
1352 $this->showTermsOfService();
1358 protected function showTermsOfService()
1368 $back_to_login = (
'getAcceptance' != $this->ctrl->getCmd());
1370 self::initStartUpTemplate(
'tpl.view_terms_of_service.html', $back_to_login, !$back_to_login);
1371 $tpl->setVariable(
'TXT_PAGEHEADLINE', $lng->txt(
'usr_agreement'));
1375 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
1378 if(
'getAcceptance' == $this->ctrl->getCmd())
1380 if(isset(
$_POST[
'status']) &&
'accepted' ==
$_POST[
'status'])
1382 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
1397 $tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this, $this->ctrl->getCmd()));
1399 $tpl->setVariable(
'ACCEPT_TERMS_OF_SERVICE', $lng->txt(
'accept_usr_agreement'));
1400 $tpl->setVariable(
'TXT_SUBMIT', $lng->txt(
'submit'));
1403 $tpl->setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->getContent());
1407 $tpl->setVariable(
'TERMS_OF_SERVICE_CONTENT', sprintf($lng->txt(
'no_agreement_description'),
'mailto:' .
ilUtil::prepareFormOutput($ilSetting->get(
'feedback_recipient'))));
1421 if (!isset(
$_GET[
"client_id"]) &&
1422 $_GET[
"cmd"] ==
"" &&
1423 $ilIliasIniFile->readVariable(
"clients",
"list"))
1428 if($ilAuth->getAuth() && $ilAuth->getStatus() ==
"")
1430 $this->processStartingPage();
1439 if ($ilSetting->get(
"pub_section") &&
$_POST[
"sendLogin"] !=
"1"
1440 && ($ilAuth->getStatus() != -101 &&
$_GET[
"soap_pw"] ==
""))
1456 function processStartingPage()
1464 if ($ilUser->getId() == ANONYMOUS_USER_ID)
1473 if(IS_PAYMENT_ENABLED)
1475 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1478 if((
int)
$_GET[
'forceShoppingCartRedirect'])
1480 ilUtil::redirect(
'ilias.php?baseClass=ilShopController&cmd=redirect&redirect_class=ilshopshoppingcartgui');
1484 if(!
$_GET[
"target"])
1487 include_once
'./Services/User/classes/class.ilUserUtil.php';
1500 global $objDefinition, $ilPluginAdmin,
$ilUser;
1502 if (is_object($ilPluginAdmin))
1505 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
1508 foreach ($pl_names as $pl)
1511 $gui_class = $ui_plugin->getUIClassInstance();
1512 $resp = $gui_class->checkGotoHook($a_target);
1513 if ($resp[
"target"] !==
false)
1515 $a_target = $resp[
"target"];
1521 if ($a_target ==
"")
1526 $t_arr = explode(
"_", $a_target);
1534 if ($type ==
"pg" | $type ==
"st")
1539 $class = $objDefinition->getClassName($type);
1545 $location = $objDefinition->getLocation($type);
1546 $full_class =
"ilObj".$class.
"Access";
1547 include_once(
$location.
"/class.".$full_class.
".php");
1549 $ret = call_user_func(array($full_class,
"_checkGoto"), $a_target);
1553 !stristr($a_target,
"_wsp") &&
1554 $ilUser->getId() != ANONYMOUS_USER_ID &&
1555 !$objDefinition->isAdministrationObject($type) &&
1556 $objDefinition->isRBACObject($type) &&
1559 global $tree, $rbacsystem, $ilAccess;
1562 if($t_arr[0] ==
"pg")
1564 if(isset($t_arr[2]))
1583 include_once
"Services/Membership/classes/class.ilParticipants.php";
1584 $block_obj = array();
1589 foreach(
$path as $path_ref_id)
1591 $redirect_infopage =
false;
1592 $add_member_role =
false;
1598 if(!$ilAccess->doActivationCheck(
"read",
"", $path_ref_id, $ilUser->getId(), $pobj_id, $ptype) ||
1599 !$ilAccess->doStatusCheck(
"read",
"", $path_ref_id, $ilUser->getId(), $pobj_id, $ptype))
1604 else if($ptype ==
"crs")
1607 include_once
"Modules/Course/classes/class.ilCourseParticipant.php";
1609 if(!$participants->isAssigned())
1612 include_once
"Modules/Course/classes/class.ilObjCourse.php";
1616 $block_obj[] = $path_ref_id;
1617 $add_member_role =
true;
1621 $redirect_infopage =
true;
1625 else if($ptype ==
"grp")
1628 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
1632 include_once
"Modules/Group/classes/class.ilObjGroup.php";
1634 if($group_obj->isRegistrationEnabled())
1636 $block_obj[] = $path_ref_id;
1637 $add_member_role =
true;
1641 $redirect_infopage =
true;
1647 if($add_member_role)
1650 $rbacsystem->resetPACache($ilUser->getId(), $path_ref_id);
1651 if(!$rbacsystem->checkAccess(
"join", $path_ref_id))
1653 $redirect_infopage =
true;
1657 $rbacsystem->addTemporaryRole($ilUser->getId(),
1663 if($redirect_infopage)
1665 if($rbacsystem->checkAccess(
"visible", $path_ref_id))
1668 "&ref_id=".$path_ref_id.
"&cmd=infoScreen");
1678 $rbacsystem->resetPACache($ilUser->getId(),
$ref_id);
1679 if($rbacsystem->checkAccess(
"read",
$ref_id) &&
sizeof($block_obj))
1686 $_SESSION[
"pending_goto"] =
"goto.php?target=".$a_target;
1690 "&ref_id=".array_shift($block_obj));
1703 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
1705 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1710 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1715 $oUser->setActive(
true);
1716 if($oRegSettings->passwordGenerationEnabled())
1719 $password = $passwd[0];
1721 $oUser->setLastPasswordChangeTS( time() );
1725 $usr_lang = $oUser->getPref(
'language');
1727 if($lng->getLangKey() != $usr_lang)
1734 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
1735 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1737 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1740 $acc_mail->setUser($oUser);
1741 if($oRegSettings->passwordGenerationEnabled())
1743 $acc_mail->setUserPassword($password);
1749 include_once
'Services/Mail/classes/class.ilMail.php';
1750 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
1753 $subject = $lng->txt(
"reg_mail_subject");
1756 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
1757 $lng->txt(
"reg_mail_body_text1").
"\n\n".
1758 $lng->txt(
"reg_mail_body_text2").
"\n".
1759 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";
1760 $body .= $lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
1762 if($oRegSettings->passwordGenerationEnabled())
1764 $body.= $lng->txt(
"passwd").
": ".$password.
"\n";
1768 $body.= $lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
1772 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
1773 $body .= $oUser->getProfileAsString($lng);
1774 $mail_obj->enableSoap(
false);
1775 $mail_obj->appendInstallationSignature(
true);
1776 $mail_obj->sendMail($oUser->getEmail(),
'',
'',
1779 array(), array(
'normal'));
1782 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful&lang='.$usr_lang);
1786 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
1788 $soap_client->setResponseTimeout(1);
1789 $soap_client->enableWSDL(
true);
1790 $soap_client->init();
1792 $ilLog->write(__METHOD__.
': Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
1796 'deleteExpiredDualOptInUserObjects',
1800 $exception->getCode()
1804 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage().
"&lang=".$usr_lang);
1808 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage().
"&lang=".$usr_lang);
1820 include_once
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
1823 return $page_editor_html;
1826 $lng->loadLanguageModule(
'auth');
1828 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1831 $form->setShowTopButtons(
false);
1832 $form->setFormAction($this->ctrl->getFormAction($this));
1833 $form->setTitle($lng->txt(
'login_to_ilias_via_openid'));
1835 $openid =
new ilTextInputGUI($lng->txt(
'auth_openid_login'),
'oid_username');
1837 $openid->setMaxLength(255);
1838 $openid->setRequired(
true);
1839 $openid->setCssClass(
'ilOpenIDBox');
1840 $openid->setInfo($lng->txt(
'auth_openid_login_info_a'));
1841 $form->addItem($openid);
1843 include_once
'./Services/OpenId/classes/class.ilOpenIdProviders.php';
1844 $pro =
new ilSelectInputGUI($lng->txt(
'auth_openid_provider'),
'oid_provider');
1847 $form->addItem($pro);
1848 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
1854 '[list-openid-login-form]',
1865 public static function initStartUpTemplate($a_tmpl, $a_show_back =
false, $a_show_logout =
false)
1877 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1881 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
1884 $tpl->addBlockfile(
'CONTENT',
'content',
'tpl.startup_screen.html',
'Services/Init');
1890 $param =
'client_id=' .
$_COOKIE[
'ilClientId'] .
'&lang=' . $lng->getLangKey();
1892 $tpl->setCurrentBlock(
'link_item_bl');
1893 $tpl->setVariable(
'LINK_TXT', $lng->txt(
'login_to_ilias'));
1894 $tpl->setVariable(
'LINK_URL',
'login.php?cmd=force_login&'.$param);
1895 $tpl->parseCurrentBlock();
1897 if($ilSetting->get(
'pub_section') &&
1898 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
'read',
'', ROOT_FOLDER_ID))
1900 $tpl->setVariable(
'LINK_URL',
'index.php?'.$param);
1901 $tpl->setVariable(
'LINK_TXT', $lng->txt(
'home'));
1902 $tpl->parseCurrentBlock();
1905 else if($a_show_logout)
1907 $tpl->setCurrentBlock(
'link_item_bl');
1908 $tpl->setVariable(
'LINK_TXT', $lng->txt(
'logout'));
1909 $tpl->setVariable(
'LINK_URL', ILIAS_HTTP_PATH .
'/logout.php');
1910 $tpl->parseCurrentBlock();
1913 if(is_array($a_tmpl))
1915 $template_file = $a_tmpl[0];
1916 $template_dir = $a_tmpl[1];
1920 $template_file = $a_tmpl;
1921 $template_dir =
'Services/Init';
1926 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
1927 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
1928 if (trim($header_top_title) !=
"" && $tpl->blockExists(
"header_top_title"))
1930 $tpl->setCurrentBlock(
"header_top_title");
1931 $tpl->setVariable(
"TXT_HEADER_TITLE", $header_top_title);
1932 $tpl->parseCurrentBlock();
1939 $tpl->setCurrentBlock(
"lang_select");
1940 $tpl->setVariable(
"TXT_LANGSELECT", $lng->txt(
"language"));
1941 $tpl->setVariable(
"LANG_SELECT", $selection);
1942 $tpl->parseCurrentBlock();
1945 $tpl->addBlockFile(
'STARTUP_CONTENT',
'startup_content', $template_file, $template_dir);
1954 include_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");