4require_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 $next_class = $this->ctrl->getNextClass($this);
42 case 'ilLoginPageGUI':
45 case "ilaccountregistrationgui":
46 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
49 case "ilpasswordassistancegui":
50 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
63 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
64 $this->ctrl->setCmd(
"");
73 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
74 $this->ctrl->setCmd(
"");
87 $status = $ilAuth->getStatus();
88 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
90 $status =
$_GET[
"auth_stat"];
93 if($ilAuth->getAuth() && !$status)
96 if (
$_GET[
"rep_ref_id"] !=
"")
100 $this->processStartingPage();
106 if (empty(
$_GET[
'cookies']))
108 $additional_params =
'';
110 if(IS_PAYMENT_ENABLED)
114 $additional_params .=
'&login_to_purchase_object=1&forceShoppingCartRedirect=1';
120 "&ext_uid=".
$_GET[
"ext_uid"].
"&cookies=nocookies&client_id=".
121 rawurlencode(CLIENT_ID).
"&lang=".
$lng->getLangKey().$additional_params);
130 unset(
$_GET[
'cookies']);
135 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
140 if (isset($WAYF) && $WAYF->is_selection())
142 if ($WAYF->is_valid_selection())
145 $WAYF->setSAMLCookie();
154 if(IS_PAYMENT_ENABLED)
156 if(isset(
$_GET[
'forceShoppingCartRedirect']) && (
int)
$_GET[
'forceShoppingCartRedirect'] == 1)
158 $this->ctrl->setParameter($this,
'forceShoppingCartRedirect', 1);
162 if (isset(
$_GET[
'login_to_purchase_object']) &&
$_GET[
'login_to_purchase_object'])
164 $lng->loadLanguageModule(
'payment');
171 if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
173 $lng->loadLanguageModule(
'registration');
174 if(
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful')
183 else if(isset(
$_GET[
'reached_session_limit']) &&
$_GET[
'reached_session_limit'])
187 else if(isset(
$_GET[
'accdel']) &&
$_GET[
'accdel'])
189 $lng->loadLanguageModule(
'user');
190 $failure =
$lng->txt(
"user_account_deleted_confirmation");
231 $lng->loadLanguageModule(
'cptch');
259 $username = $ilAuth->getExceededUserName();
295 $auth_error = $ilias->getAuthError();
296 if (is_object($auth_error))
298 $add =
"<br>".$auth_error->getMessage();
307 $lng->loadLanguageModule(
"auth");
315 self::initStartUpTemplate(
"tpl.login.html");
334 $page_editor_html = $this->showTermsOfServiceLink($page_editor_html);
341 $tpl->setVariable(
"PAGETITLE",
"- ".
$lng->txt(
"startpage"));
342 $tpl->setVariable(
"ILIAS_RELEASE",
$ilSetting->get(
"ilias_version"));
344 $this->ctrl->setTargetScript(
"ilias.php");
348 if (isset(
$_GET[
'cookies']) &&
$_GET[
'cookies'] ==
'nocookies')
353 if(strlen($page_editor_html))
355 $tpl->setVariable(
'LPE',$page_editor_html);
358 $tpl->fillWindowTitle();
359 $tpl->fillCssFiles();
360 $tpl->fillJavaScriptFiles();
362 $tpl->show(
"DEFAULT",
false);
369 self::initStartUpTemplate(
"tpl.login_reactivate_code.html");
378 $tpl->setVariable(
"FORM", $a_form->getHTML());
379 $tpl->show(
"DEFAULT",
false);
386 $lng->loadLanguageModule(
"auth");
388 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
391 $form->setFormAction(
$ilCtrl->getFormAction($this,
'showcodeform'));
392 $form->setTitle(
$lng->txt(
'auth_account_code_title'));
395 $count->setRequired(
true);
396 $count->setInfo(
$lng->txt(
'auth_account_code_info'));
397 $form->addItem($count);
401 $uname->setValue($a_username);
402 $form->addItem($uname);
404 $form->addCommandButton(
'processCode',
$lng->txt(
'send'));
416 if($uname && $form->checkInput())
418 $code = $form->getInput(
"code");
420 include_once
"Services/User/classes/class.ilAccountCode.php";
431 $invalid_code =
false;
434 if($valid_until ===
"0")
436 $user->setTimeLimitUnlimited(
true);
440 if(is_numeric($valid_until))
442 $valid_until = strtotime(
"+".$valid_until.
"days");
446 $valid_until = explode(
"-", $valid_until);
447 $valid_until = mktime(23, 59, 59, $valid_until[1],
448 $valid_until[2], $valid_until[0]);
449 if($valid_until < time())
451 $invalid_code =
true;
457 $user->setTimeLimitUnlimited(
false);
458 $user->setTimeLimitUntil($valid_until);
464 $user->setActive(
true);
476 $ilCtrl->setParameter($this,
"cu", 1);
477 $ilCtrl->redirect($this,
"showLogin");
481 $lng->loadLanguageModule(
"user");
482 $field = $form->getItemByPostVar(
"code");
483 $field->setAlert(
$lng->txt(
"user_account_code_not_valid"));
486 $form->setValuesByPost();
509 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
512 $form->setFormAction($this->ctrl->getFormAction($this,
''));
513 $form->setName(
"formlogin");
514 $form->setShowTopButtons(
false);
515 $form->setTitle(
$lng->txt(
"login_to_ilias"));
518 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
522 $visible_auth_methods = array();
526 if(isset($option[
'hide_in_ui']) && $option[
'hide_in_ui'])
532 $radg->addOption($op1);
533 if (isset($option[
'checked']))
535 $radg->setValue($key);
537 $visible_auth_methods[] = $op1;
540 if(count($visible_auth_methods) == 1)
542 $first_auth_method = current($visible_auth_methods);
544 $hidden_auth_method->setValue($first_auth_method->getValue());
545 $form->addItem($hidden_auth_method);
549 $form->addItem($radg);
555 $ti->setRequired(
true);
559 $pi->setRetype(
false);
561 $pi->setDisableHtmlAutoComplete(
false);
562 $pi->setRequired(
true);
564 $form->addCommandButton(
"showLogin",
$lng->txt(
"log_in"));
566 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
567 if(ilCaptchaUtil::isActiveForLogin())
569 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
571 $captcha->setRequired(
true);
572 $form->addItem($captcha);
584 return $page_editor_html;
596 if(strlen($page_editor_html))
599 return $page_editor_html;
602 $loginSettings =
new ilSetting(
"login_settings");
603 $information = $loginSettings->get(
"login_message_".
$lng->getLangKey());
605 if(strlen(trim($information)))
607 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
609 return $page_editor_html;
626 $tpl =
new ilTemplate(
'tpl.login_form_cas.html',
true,
true,
'Services/Init');
627 $tpl->setVariable(
"TXT_CAS_LOGIN",
$lng->txt(
"login_to_ilias_via_cas"));
629 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"cas_login_instructions"));
630 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
631 $tpl->setVariable(
"TARGET_CAS_LOGIN",$this->ctrl->getLinkTarget($this,
"showLogin"));
632 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
638 '[list-cas-login-form]',
642 return $page_editor_html;
659 $tpl =
new ilTemplate(
'tpl.login_form_shibboleth.html',
true,
true,
'Services/Init');
661 $tpl->setVariable(
'SHIB_FORMACTION',
'./shib_login.php');
663 if (
$ilSetting->get(
"shib_hos_type") ==
'external_wayf') {
664 $tpl->setCurrentBlock(
"shibboleth_login");
665 $tpl->setVariable(
"TXT_SHIB_LOGIN",
$lng->txt(
"login_to_ilias_via_shibboleth"));
666 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
667 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME",
$ilSetting->get(
"shib_federation_name"));
668 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON",
$ilSetting->get(
"shib_login_button"));
669 $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>.');
670 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"shib_login_instructions"));
671 $tpl->parseCurrentBlock();
672 } elseif (
$ilSetting->get(
"shib_hos_type") ==
'embedded_wayf') {
673 $tpl->setCurrentBlock(
"shibboleth_custom_login");
674 $customInstructions = stripslashes(
$ilSetting->get(
"shib_login_instructions"));
675 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
676 $tpl->parseCurrentBlock();
678 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
679 $tpl->setVariable(
"TXT_SHIB_LOGIN",
$lng->txt(
"login_to_ilias_via_shibboleth"));
680 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME",
$ilSetting->get(
"shib_federation_name"));
681 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf(
$lng->txt(
"shib_select_home_organization"),
$ilSetting->get(
"shib_federation_name")));
682 $tpl->setVariable(
"TXT_CONTINUE",
$lng->txt(
"btn_next"));
683 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION",
$lng->txt(
"shib_home_organization"));
684 $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>.');
685 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"shib_login_instructions"));
687 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
690 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
691 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
692 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
693 $tpl->parseCurrentBlock();
699 return $page_editor_html;
714 if(!strlen($page_editor_html))
716 $tpl->setVariable($fallback_tplvar,$element_html);
717 return $page_editor_html;
720 if(!stristr($page_editor_html, $placeholder))
722 $tpl->setVariable($fallback_tplvar,$element_html);
723 return $page_editor_html;
725 return str_replace($placeholder, $element_html, $page_editor_html);
736 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
738 $active_lang = $lpe->getIliasEditorLanguage(
$lng->getLangKey());
746 include_once
'./Services/COPage/classes/class.ilPageUtil.php';
752 include_once
'./Services/Authentication/classes/class.ilLoginPage.php';
753 include_once
'./Services/Authentication/classes/class.ilLoginPageGUI.php';
755 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
757 $tpl->setCurrentBlock(
"SyntaxStyle");
759 $tpl->parseCurrentBlock();
764 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
765 $page_gui->setStyleId(0,
'auth');
767 $page_gui->setPresentationTitle(
"");
768 $page_gui->setTemplateOutput(
false);
769 $page_gui->setHeader(
"");
770 $ret = $page_gui->showPage();
787 $rtpl =
new ilTemplate(
'tpl.login_registration_links.html',
true,
true,
'Services/Init');
790 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
793 $rtpl->setCurrentBlock(
"new_registration");
794 $rtpl->setVariable(
"REGISTER",
$lng->txt(
"registration"));
795 $rtpl->setVariable(
"CMD_REGISTER",
796 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
""));
797 $rtpl->parseCurrentBlock();
802 $rtpl->setCurrentBlock(
"password_assistance");
803 $rtpl->setVariable(
"FORGOT_PASSWORD",
$lng->txt(
"forgot_password"));
804 $rtpl->setVariable(
"FORGOT_USERNAME",
$lng->txt(
"forgot_username"));
805 $rtpl->setVariable(
"CMD_FORGOT_PASSWORD",
806 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
""));
807 $rtpl->setVariable(
"CMD_FORGOT_USERNAME",
808 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm"));
809 $rtpl->setVariable(
"LANG_ID",
$lng->getLangKey());
810 $rtpl->parseCurrentBlock();
814 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", ROOT_FOLDER_ID))
816 $rtpl->setCurrentBlock(
"homelink");
817 $rtpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".
$lng->getLangKey());
818 $rtpl->setVariable(
"TXT_HOME",
$lng->txt(
"home"));
819 $rtpl->parseCurrentBlock();
824 $rtpl->setCurrentBlock(
"client_list");
825 $rtpl->setVariable(
"TXT_CLIENT_LIST",
$lng->txt(
"to_client_list"));
826 $rtpl->setVariable(
"CMD_CLIENT_LIST",$this->ctrl->getLinkTarget($this,
"showClientList"));
827 $rtpl->parseCurrentBlock();
834 '[list-registration-link]',
835 'REG_PWD_CLIENT_LINKS'
844 protected function showTermsOfServiceLink($page_editor_html)
854 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
857 $utpl =
new ilTemplate(
'tpl.login_terms_of_service_link.html',
true,
true,
'Services/Init');
858 $utpl->setVariable(
'TXT_TERMS_OF_SERVICE',
$lng->txt(
'usr_agreement'));
859 $utpl->setVariable(
'LINK_TERMS_OF_SERVICE', $this->ctrl->getLinkTarget($this,
'showTermsOfService'));
865 '[list-user-agreement]',
878 '[list-user-agreement]',
892 '[list-language-selection] ',
893 '[list-registration-link]',
894 '[list-user-agreement]',
896 '[list-cas-login-form]',
897 '[list-shibboleth-login-form]',
898 '[list-openid-login-form]'
900 array(
'',
'',
'',
'',
'',
'',
''),
909 public function showAccountMigration($a_message =
'')
917 $lng->loadLanguageModule(
'auth');
918 self::initStartUpTemplate(
'tpl.login_account_migration.html');
920 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
922 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
924 $form->setTitle(
$lng->txt(
'auth_account_migration'));
925 $form->addCommandButton(
'migrateAccount',
$lng->txt(
'save'));
926 $form->addCommandButton(
'showLogin',
$lng->txt(
'cancel'));
931 $keep =
new ilRadioOption(
$lng->txt(
'auth_account_migration_keep'),1,
$lng->txt(
'auth_info_migrate'));
933 $user->setRequired(
true);
936 $user->setMaxLength(128);
937 $keep->addSubItem($user);
940 $pass->setRetype(
false);
941 $pass->setRequired(
true);
944 $pass->setMaxLength(128);
945 $keep->addSubItem(
$pass);
946 $rad->addOption($keep);
949 $rad->addOption($new);
951 $form->addItem($rad);
953 $tpl->setVariable(
'MIG_FORM',$form->getHTML());
955 if(strlen($a_message))
960 $tpl->show(
'DEFAULT');
971 global
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
973 $lng->loadLanguageModule(
'auth');
975 if(!isset(
$_POST[
'account_migration']))
977 $this->showAccountMigration(
$lng->txt(
'err_choose_migration_type'));
981 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
983 $this->showAccountMigration(
$lng->txt(
'err_wrong_login'));
987 if(
$_POST[
'account_migration'] == 1)
991 $this->showAccountMigration(
$lng->txt(
'err_wrong_login'));
997 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
998 include_once
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
1002 if(!$ilAuth->checkAuth())
1005 $this->showAccountMigration(
$lng->txt(
'err_wrong_login'));
1014 $user->setExternalAccount(
ilSession::get(
'tmp_external_account'));
1015 $user->setActive(
true);
1023 $rbacadmin->assignUser((
int) $role,$user->getId());
1030 elseif(
$_POST[
'account_migration'] == 2)
1038 include_once(
'Services/AuthApache/classes/class.ilAuthContainerApache.php');
1040 $container->forceCreation(
true);
1050 include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
1052 $container->forceCreation(
true);
1061 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1062 include_once
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
1065 $container->forceCreation(
true);
1077 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1078 include_once
'./Services/OpenId/classes/class.ilAuthContainerOpenId.php';
1081 $container->forceCreation(
true);
1083 include_once
'./Services/OpenId/classes/class.ilAuthOpenId.php';
1094 $this->processStartingPage();
1113 self::initStartUpTemplate(
"tpl.logout.html");
1117 $tpl->setCurrentBlock(
"homelink");
1119 $tpl->setVariable(
"TXT_HOME",
$lng->txt(
"home"));
1120 $tpl->parseCurrentBlock();
1125 $tpl->setCurrentBlock(
"client_list");
1126 $tpl->setVariable(
"TXT_CLIENT_LIST",
$lng->txt(
"to_client_list"));
1127 $this->ctrl->setParameter($this,
"client_id",
$client_id);
1128 $tpl->setVariable(
"CMD_CLIENT_LIST",
1129 $this->ctrl->getLinkTarget($this,
"showClientList"));
1130 $tpl->parseCurrentBlock();
1131 $this->ctrl->setParameter($this,
"client_id",
"");
1134 $tpl->setVariable(
"TXT_PAGEHEADLINE",
$lng->txt(
"logout"));
1135 $tpl->setVariable(
"TXT_LOGOUT_TEXT",
$lng->txt(
"logout_text"));
1136 $tpl->setVariable(
"TXT_LOGIN",
$lng->txt(
"login_to_ilias"));
1150 $valid = $ilAuth->getValidationData();
1152 self::initStartUpTemplate(
"tpl.user_mapping_selection.html");
1161 include_once(
'./Services/User/classes/class.ilObjUser.php');
1162 if (count($email_user) == 1)
1165 $tpl->setCurrentBlock(
"one_user");
1166 $tpl->setVariable(
"TXT_USERNAME",
$lng->txt(
"username"));
1167 $tpl->setVariable(
"VAL_USERNAME", current($email_user));
1168 $tpl->setVariable(
"USER_ID", key($email_user));
1169 $tpl->parseCurrentBlock();
1173 foreach($email_user as $key => $login)
1175 $tpl->setCurrentBlock(
"user");
1176 $tpl->setVariable(
"USR_ID", $key);
1177 $tpl->setVariable(
"VAL_USER", $login);
1178 $tpl->parseCurrentBlock();
1180 $tpl->setCurrentBlock(
"multpiple_user");
1181 $tpl->parseCurrentBlock();
1184 $tpl->setCurrentBlock(
"content");
1185 $this->ctrl->setParameter($this,
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
1186 $this->ctrl->setParameter($this,
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
1187 $this->ctrl->setParameter($this,
"auth_stat",
$_GET[
"auth_stat"]);
1188 $tpl->setVariable(
"FORMACTION",
1189 $this->ctrl->getFormAction($this));
1190 $tpl->setVariable(
"TXT_ILIAS_LOGIN",
$lng->txt(
"login_to_ilias"));
1191 if (count($email_user) == 1)
1193 $tpl->setVariable(
"TXT_EXPLANATION",
$lng->txt(
"ums_explanation"));
1194 $tpl->setVariable(
"TXT_EXPLANATION_2",
$lng->txt(
"ums_explanation_2"));
1198 $tpl->setVariable(
"TXT_EXPLANATION",
$lng->txt(
"ums_explanation_3"));
1199 $tpl->setVariable(
"TXT_EXPLANATION_2",
$lng->txt(
"ums_explanation_4"));
1201 $tpl->setVariable(
"TXT_CREATE_USER",
$lng->txt(
"ums_create_new_account"));
1202 $tpl->setVariable(
"TXT_PASSWORD",
$lng->txt(
"password"));
1204 $tpl->setVariable(
"TXT_SUBMIT",
$lng->txt(
"login"));
1222 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1223 $tpl->setAddFooter(
false);
1225 $tpl->setVariable(
"PAGETITLE",
$lng->txt(
"clientlist_clientlist"));
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).
"\">".
$lng->txt(
"clientlist_login_page").
"</a>";
1264 if(
$client->getSetting(
'pub_section'))
1266 $hasPublicSection =
true;
1267 $tmp[] =
"<a href=\"" .
"ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode($key) .
"\">".$lng->txt(
"clientlist_start_page").
"</a>";
1282 if($hasPublicSection)
1284 $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
1285 $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"),
$lng->txt(
"clientlist_login"),
$lng->txt(
"clientlist_public_access")));
1286 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
1287 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
1291 $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
1292 $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"),
$lng->txt(
"clientlist_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"]);
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 include_once(
"./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
1422 if (!isset(
$_GET[
"client_id"]) &&
1423 $_GET[
"cmd"] ==
"" &&
1429 if($ilAuth->getAuth() && $ilAuth->getStatus() ==
"")
1431 $this->processStartingPage();
1441 && ($ilAuth->getStatus() != -101 &&
$_GET[
"soap_pw"] ==
""))
1457 function processStartingPage()
1465 if (
$ilUser->getId() == ANONYMOUS_USER_ID)
1474 if(IS_PAYMENT_ENABLED)
1476 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1479 if((
int)
$_GET[
'forceShoppingCartRedirect'])
1481 ilUtil::redirect(
'ilias.php?baseClass=ilShopController&cmd=redirect&redirect_class=ilshopshoppingcartgui');
1485 if(!
$_GET[
"target"])
1488 include_once
'./Services/User/classes/class.ilUserUtil.php';
1501 global $objDefinition, $ilPluginAdmin,
$ilUser;
1503 if (is_object($ilPluginAdmin))
1506 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
1509 foreach ($pl_names as $pl)
1512 $gui_class = $ui_plugin->getUIClassInstance();
1513 $resp = $gui_class->checkGotoHook($a_target);
1514 if ($resp[
"target"] !==
false)
1516 $a_target = $resp[
"target"];
1522 if ($a_target ==
"")
1527 $t_arr = explode(
"_", $a_target);
1535 if ($type ==
"pg" | $type ==
"st")
1540 $class = $objDefinition->getClassName($type);
1546 $location = $objDefinition->getLocation($type);
1547 $full_class =
"ilObj".$class.
"Access";
1548 include_once(
$location.
"/class.".$full_class.
".php");
1550 $ret = call_user_func(array($full_class,
"_checkGoto"), $a_target);
1554 !stristr($a_target,
"_wsp") &&
1555 $ilUser->getId() != ANONYMOUS_USER_ID &&
1556 !$objDefinition->isAdministrationObject($type) &&
1557 $objDefinition->isRBACObject($type) &&
1560 global $tree, $rbacsystem, $ilAccess;
1563 if($t_arr[0] ==
"pg")
1565 if(isset($t_arr[2]))
1584 include_once
"Services/Membership/classes/class.ilParticipants.php";
1585 $block_obj = array();
1590 foreach(
$path as $path_ref_id)
1592 $redirect_infopage =
false;
1593 $add_member_role =
false;
1599 if(!$ilAccess->doActivationCheck(
"read",
"", $path_ref_id,
$ilUser->getId(), $pobj_id, $ptype) ||
1600 !$ilAccess->doStatusCheck(
"read",
"", $path_ref_id,
$ilUser->getId(), $pobj_id, $ptype))
1605 else if($ptype ==
"crs")
1608 include_once
"Modules/Course/classes/class.ilCourseParticipant.php";
1610 if(!$participants->isAssigned())
1613 include_once
"Modules/Course/classes/class.ilObjCourse.php";
1617 $block_obj[] = $path_ref_id;
1618 $add_member_role =
true;
1622 $redirect_infopage =
true;
1626 else if($ptype ==
"grp")
1629 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
1633 include_once
"Modules/Group/classes/class.ilObjGroup.php";
1635 if($group_obj->isRegistrationEnabled())
1637 $block_obj[] = $path_ref_id;
1638 $add_member_role =
true;
1642 $redirect_infopage =
true;
1648 if($add_member_role)
1651 $rbacsystem->resetPACache(
$ilUser->getId(), $path_ref_id);
1652 if(!$rbacsystem->checkAccess(
"join", $path_ref_id))
1654 $redirect_infopage =
true;
1658 $rbacsystem->addTemporaryRole(
$ilUser->getId(),
1664 if($redirect_infopage)
1666 if($rbacsystem->checkAccess(
"visible", $path_ref_id))
1669 "&ref_id=".$path_ref_id.
"&cmd=infoScreen");
1680 if($rbacsystem->checkAccess(
"read",
$ref_id) &&
sizeof($block_obj))
1687 $_SESSION[
"pending_goto"] =
"goto.php?target=".$a_target;
1691 "&ref_id=".array_shift($block_obj));
1704 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
1706 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1711 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1716 $oUser->setActive(
true);
1717 if($oRegSettings->passwordGenerationEnabled())
1720 $password = $passwd[0];
1722 $oUser->setLastPasswordChangeTS( time() );
1726 $usr_lang = $oUser->getPref(
'language');
1728 if(
$lng->getLangKey() != $usr_lang)
1733 $target = $oUser->getPref(
'reg_target');
1734 if(strlen($target) > 0)
1736 $_GET[
'target'] = $target;
1741 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
1742 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1744 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1747 $acc_mail->setUser($oUser);
1748 if($oRegSettings->passwordGenerationEnabled())
1750 $acc_mail->setUserPassword($password);
1756 include_once
'Services/Mail/classes/class.ilMail.php';
1757 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
1760 $subject =
$lng->txt(
"reg_mail_subject");
1763 $body =
$lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
1764 $lng->txt(
"reg_mail_body_text1").
"\n\n".
1765 $lng->txt(
"reg_mail_body_text2").
"\n".
1766 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";
1767 $body .=
$lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
1769 if($oRegSettings->passwordGenerationEnabled())
1771 $body.=
$lng->txt(
"passwd").
": ".$password.
"\n";
1775 $body.=
$lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
1779 $body .= (
$lng->txt(
"reg_mail_body_text3").
"\n\r");
1780 $body .= $oUser->getProfileAsString(
$lng);
1781 $mail_obj->enableSoap(
false);
1782 $mail_obj->appendInstallationSignature(
true);
1783 $mail_obj->sendMail($oUser->getEmail(),
'',
'',
1786 array(), array(
'normal'));
1789 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful&lang='.$usr_lang);
1793 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
1795 $soap_client->setResponseTimeout(1);
1796 $soap_client->enableWSDL(
true);
1797 $soap_client->init();
1799 $ilLog->write(__METHOD__.
': Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
1803 'deleteExpiredDualOptInUserObjects',
1807 $exception->getCode()
1811 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage().
"&lang=".$usr_lang);
1815 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage().
"&lang=".$usr_lang);
1827 include_once
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
1830 return $page_editor_html;
1833 $lng->loadLanguageModule(
'auth');
1835 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1838 $form->setShowTopButtons(
false);
1839 $form->setFormAction($this->ctrl->getFormAction($this));
1840 $form->setTitle(
$lng->txt(
'login_to_ilias_via_openid'));
1843 $openid->setSize(18);
1844 $openid->setMaxLength(255);
1845 $openid->setRequired(
true);
1846 $openid->setCssClass(
'ilOpenIDBox');
1847 $openid->setInfo(
$lng->txt(
'auth_openid_login_info_a'));
1848 $form->addItem($openid);
1850 include_once
'./Services/OpenId/classes/class.ilOpenIdProviders.php';
1854 $form->addItem($pro);
1855 $form->addCommandButton(
"showLogin",
$lng->txt(
"log_in"));
1861 '[list-openid-login-form]',
1872 public static function initStartUpTemplate($a_tmpl, $a_show_back =
false, $a_show_logout =
false)
1884 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1888 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
1891 $tpl->addBlockfile(
'CONTENT',
'content',
'tpl.startup_screen.html',
'Services/Init');
1897 $param =
'client_id=' .
$_COOKIE[
'ilClientId'] .
'&lang=' .
$lng->getLangKey();
1899 $tpl->setCurrentBlock(
'link_item_bl');
1900 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'login_to_ilias'));
1901 $tpl->setVariable(
'LINK_URL',
'login.php?cmd=force_login&'.$param);
1902 $tpl->parseCurrentBlock();
1905 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
'read',
'', ROOT_FOLDER_ID))
1907 $tpl->setVariable(
'LINK_URL',
'index.php?'.$param);
1908 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'home'));
1909 $tpl->parseCurrentBlock();
1912 else if($a_show_logout)
1914 $tpl->setCurrentBlock(
'link_item_bl');
1915 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'logout'));
1916 $tpl->setVariable(
'LINK_URL', ILIAS_HTTP_PATH .
'/logout.php');
1917 $tpl->parseCurrentBlock();
1920 if(is_array($a_tmpl))
1922 $template_file = $a_tmpl[0];
1923 $template_dir = $a_tmpl[1];
1927 $template_file = $a_tmpl;
1928 $template_dir =
'Services/Init';
1933 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
1934 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
1935 if (trim($header_top_title) !=
"" &&
$tpl->blockExists(
"header_top_title"))
1937 $tpl->setCurrentBlock(
"header_top_title");
1938 $tpl->setVariable(
"TXT_HEADER_TITLE", $header_top_title);
1939 $tpl->parseCurrentBlock();
1946 $tpl->setCurrentBlock(
"lang_select");
1947 $tpl->setVariable(
"TXT_LANGSELECT",
$lng->txt(
"language"));
1948 $tpl->setVariable(
"LANG_SELECT", $selection);
1949 $tpl->parseCurrentBlock();
1952 $tpl->addBlockFile(
'STARTUP_CONTENT',
'startup_content', $template_file, $template_dir);
1961 include_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
const AUTH_EXPIRED
Returned if session has expired.
const AUTH_WRONG_LOGIN
Returned if container is unable to authenticate user/password pair.
const AUTH_IDLED
Returned if session exceeds idle time.
const AUTH_SOAP_NO_ILIAS_USER
const AUTH_USER_SIMULTANEOUS_LOGIN
const AUTH_CAPTCHA_INVALID
const AUTH_CAS_NO_ILIAS_USER
const AUTH_RADIUS_NO_ILIAS_USER
const AUTH_USER_INACTIVE_LOGIN_ATTEMPTS
const AUTH_USER_TIME_LIMIT_EXCEEDED
const AUTH_LDAP_NO_ILIAS_USER
static isUnusedCode($code)
static getCodeValidUntil($code)
static applyRoleAssignments(ilObjUser $user, $code)
static applyAccessLimits(ilObjUser $user, $code)
Class ilAccountRegistrationGUI.
Authentication against ILIAS database.
Overwritten Pear class AuthContainerLDAP This class is overwritten to support nested groups.
Authentication against ILIAS database.
@classDescription Pear auth container for openid
@classDescription Overwritten Pear class AuthContainerRadius This class is overwritten to support to ...
static factory(ilAuthContainerBase $deco)
The factory.
static setContext($a_context)
set context
static getInstance()
Get singelton instance.
static _getInstance()
Get instance.
static _getMultipleAuthModeOptions($lng)
static _hasMultipleAuthenticationMethods()
Administrates DB connections in setup.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
static goToPublicSection($a_auth_stat="")
go to public section
_lookupContObjID($a_id)
get learning module / digibook id for lm object
static lookupId($a_lang_key)
Lookup obj_id of language @global ilDB $ilDB.
static getLogger($a_component_id)
Get component logger.
Class Mail this class handles base functions for mail handling.
static getLanguageSelection($a_in_topbar=false)
_isActivated($a_obj_id)
Is activated.
_registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
_lookupNewAccountMail($a_lang)
static _verifyRegistrationHash($a_hash)
Verifies a registration hash.
static _lookupId($a_user_str)
Lookup id by login.
_getLocalAccountsForEmail($a_email)
check whether external account and authentication method matches with a user
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance()
Get singleton instance.
static getInstance()
Get singleton instance.
_existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
static getDefaultMemberRole($a_ref_id)
Password assistance facility for users who have forgotten their password or for users for whom no pas...
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
This class represents an option in a radio group.
Class for user related exception handling in ILIAS.
Class for user related exception handling in ILIAS.
Class ilObjAuthSettingsGUI.
_lookupRegistrationType()
const SESSION_CLOSE_CAPTCHA
static set($a_var, $a_val)
Set a value.
static setClosingContext($a_context)
set closing context (for statistics)
static _destroy($a_session_id, $a_closing_context=null, $a_expired_at=null)
Destroy session.
const SESSION_CLOSE_SIMUL
static get($a_var)
Get a value.
const SESSION_CLOSE_INACTIVE
processIndexPHP()
process index.php
showShibbolethLoginForm($page_editor_html)
Show shibboleth login form.
showCASLoginForm($page_editor_html)
Show cas login @global ilSetting $ilSetting.
showLoginForm($page_editor_html)
Show login form @global ilSetting $ilSetting.
& executeCommand()
execute command
getAcceptance()
Get terms of service.
showCodeForm($a_username=null, $a_form=null)
showOpenIdLoginForm($page_editor_html)
Show openid login if enabled.
purgePlaceholders($page_editor_html)
Purge page editor html from unused placeholders.
ilStartUpGUI()
constructor
migrateAccount()
migrate account
substituteLoginPageElements($tpl, $page_editor_html, $element_html, $placeholder, $fallback_tplvar)
Substitute login page elements.
showClientList()
show client list
static getLanguageSelection()
language selection list
jumpToPasswordAssistance()
jump to password assistance
showLogout()
show logout screen
jumpToRegistration()
jump to registration gui
getLoginPageEditorHTML()
Get HTML of ILIAS login page editor.
initCodeForm($a_username)
showLoginInformation($page_editor_html)
Show login information.
showUserMappingSelection()
Show user selection screen, if external account could not be mapped to an ILIAS account,...
showNoCookiesScreen()
show help screen, if cookies are disabled
showRegistrationLinks($page_editor_html)
Show registration, password forgotten, client slection links @global ilLanguage $lng @global ilSettin...
special template class to simplify handling of ITX/PEAR
static trackAcceptance(ilObjUser $user, ilTermsOfServiceSignableDocument $document)
static getByLanguageObject(ilLanguage $lng)
This class represents a text property in a property form.
static getStartingPointAsUrl()
Get current starting point setting as URL.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static setCookie($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static generatePasswords($a_number)
Generate a number of passwords.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static initjQuery($a_tpl=null)
Init jQuery.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']