72 $this->ctrl =
$DIC->ctrl();
73 $this->lng =
$DIC->language();
74 $this->lng->loadLanguageModule(
'auth');
77 $this->ctrl->saveParameter($this, array(
"rep_ref_id",
"lang",
"target",
"client_id"));
79 $this->
user->setLanguage($this->lng->getLangKey());
88 $cmd = $this->ctrl->getCmd(
"processIndexPHP", array(
'processIndexPHP',
'showLoginPage'));
89 $next_class = $this->ctrl->getNextClass($this);
91 switch ($next_class) {
92 case 'ilLoginPageGUI':
95 case "ilaccountregistrationgui":
96 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
99 case "ilpasswordassistancegui":
100 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
104 if (method_exists($this, $cmd)) {
105 return $this->$cmd();
125 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
126 $this->ctrl->setCmd(
"");
136 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
137 $this->ctrl->setCmd(
"");
144 protected function showLoginPageOrStartupPage()
150 $auth_session =
$GLOBALS[
'DIC'][
'ilAuthSession'];
151 $ilAppEventHandler =
$GLOBALS[
'DIC'][
'ilAppEventHandler'];
153 $force_login =
false;
155 !is_array($_REQUEST[
'cmd']) &&
156 strcmp($_REQUEST[
'cmd'],
'force_login') === 0
162 $this->logger->debug(
'Force login');
163 if ($auth_session->isValid()) {
164 $this->logger->debug(
'Valid session -> logout current user');
166 $auth_session->logout();
168 $ilAppEventHandler->raise(
169 'Services/Authentication',
172 'username' => $this->
user->getLogin()
176 $this->logger->debug(
'Show login page');
183 if ($auth_session->isValid()) {
184 $this->logger->debug(
'Valid session -> redirect to starting page');
185 return ilInitialisation::redirectToStartingPage();
187 $this->logger->debug(
'No valid session -> show login');
200 $this->
getLogger()->debug(
'Showing login page');
203 if (isset(
$_GET[
'ext_uid']) && is_string(
$_GET[
'ext_uid'])) {
204 $extUid =
$_GET[
'ext_uid'];
207 if (isset(
$_GET[
'soap_pw']) && is_string(
$_GET[
'soap_pw'])) {
208 $soapPw =
$_GET[
'soap_pw'];
211 require_once
'Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentialsSoap.php';
215 $credentials->tryAuthenticationOnLoginPage();
218 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentialsApache.php';
220 $frontend->tryAuthenticationOnLoginPage();
223 self::initStartUpTemplate(
"tpl.login.html");
238 $tpl->setVariable(
"PAGETITLE",
"- " . $this->lng->txt(
"startpage"));
239 $tpl->setVariable(
"ILIAS_RELEASE",
$ilSetting->get(
"ilias_version"));
242 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
247 if (strlen($page_editor_html)) {
248 $tpl->setVariable(
'LPE', $page_editor_html);
251 $tpl->fillWindowTitle();
252 $tpl->fillCssFiles();
253 $tpl->fillJavaScriptFiles();
254 $tpl->show(
"DEFAULT",
false);
267 $this->
getLogger()->warning(
'Using deprecated startup method');
270 $status = $ilAuth->getStatus();
271 if ($status ==
"" && isset(
$_GET[
"auth_stat"])) {
272 $status =
$_GET[
"auth_stat"];
275 if ($ilAuth->getAuth() && !$status) {
277 if (
$_GET[
"rep_ref_id"] !=
"") {
280 include_once
'./Services/Init/classes/class.ilInitialisation.php';
281 ilInitialisation::redirectToStartingPage();
287 if (empty(
$_GET[
'cookies'])) {
288 $additional_params =
'';
291 "&ext_uid=" .
$_GET[
"ext_uid"] .
"&cookies=nocookies&client_id=" .
292 rawurlencode(CLIENT_ID) .
"&lang=" .
$lng->getLangKey() . $additional_params);
297 unset(
$_GET[
'cookies']);
301 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
306 if (isset($WAYF) && $WAYF->is_selection()) {
307 if ($WAYF->is_valid_selection()) {
309 $WAYF->setSAMLCookie();
319 if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg']))) {
320 $lng->loadLanguageModule(
'registration');
321 if (
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful') {
326 } elseif (isset(
$_GET[
'reached_session_limit']) &&
$_GET[
'reached_session_limit']) {
328 } elseif (isset(
$_GET[
'accdel']) &&
$_GET[
'accdel']) {
329 $lng->loadLanguageModule(
'user');
330 $failure =
$lng->txt(
"user_account_deleted_confirmation");
333 if (!empty($status)) {
368 $lng->loadLanguageModule(
'auth');
372 $lng->loadLanguageModule(
'cptch');
400 $username = $ilAuth->getExceededUserName();
404 if (
$ilSetting->get(
'user_reactivate_code')) {
424 case AUTH_WRONG_LOGIN:
427 $auth_error = $ilias->getAuthError();
428 if (is_object($auth_error)) {
429 $add =
"<br>" . $auth_error->getMessage();
437 $lng->loadLanguageModule(
"auth");
445 self::initStartUpTemplate(
"tpl.login.html");
466 $tpl->setVariable(
"PAGETITLE",
"- " .
$lng->txt(
"startpage"));
467 $tpl->setVariable(
"ILIAS_RELEASE",
$ilSetting->get(
"ilias_version"));
472 if (isset(
$_GET[
'cookies']) &&
$_GET[
'cookies'] ==
'nocookies') {
476 if (strlen($page_editor_html)) {
477 $tpl->setVariable(
'LPE', $page_editor_html);
480 $tpl->fillWindowTitle();
481 $tpl->fillCssFiles();
482 $tpl->fillJavaScriptFiles();
484 $tpl->show(
"DEFAULT",
false);
491 self::initStartUpTemplate(
"tpl.login_reactivate_code.html");
499 $tpl->setVariable(
"FORM", $a_form->getHTML());
500 $tpl->show(
"DEFAULT",
false);
507 $lng->loadLanguageModule(
"auth");
509 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
512 $form->setFormAction(
$ilCtrl->getFormAction($this,
'showcodeform'));
513 $form->setTitle(
$lng->txt(
'auth_account_code_title'));
516 $count->setRequired(
true);
517 $count->setInfo(
$lng->txt(
'auth_account_code_info'));
518 $form->addItem($count);
522 $uname->setValue($a_username);
523 $form->addItem($uname);
525 $form->addCommandButton(
'processCode',
$lng->txt(
'send'));
544 if ($uname &&
$form->checkInput()) {
547 include_once
"Services/User/classes/class.ilAccountCode.php";
556 $invalid_code =
false;
559 if ($valid_until ===
"0") {
560 $user->setTimeLimitUnlimited(
true);
562 if (is_numeric($valid_until)) {
563 $valid_until = strtotime(
"+" . $valid_until .
"days");
565 $valid_until = explode(
"-", $valid_until);
566 $valid_until = mktime(
574 if ($valid_until < time()) {
575 $invalid_code =
true;
579 if (!$invalid_code) {
580 $user->setTimeLimitUnlimited(
false);
581 $user->setTimeLimitUntil($valid_until);
585 if (!$invalid_code) {
586 $user->setActive(
true);
598 $ilCtrl->setParameter($this,
"cu", 1);
599 $GLOBALS[
'DIC']->language()->loadLanguageModule(
'auth');
600 ilUtil::sendSuccess(
$GLOBALS[
'DIC']->language()->txt(
'auth_activation_code_success'),
true);
601 $ilCtrl->redirect($this,
"showLoginPage");
605 $lng->loadLanguageModule(
"user");
606 $field =
$form->getItemByPostVar(
"code");
607 $field->setAlert(
$lng->txt(
"user_account_code_not_valid"));
610 $form->setValuesByPost();
621 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
623 $form->setFormAction($this->ctrl->getFormAction($this,
''));
624 $form->setName(
"formlogin");
625 $form->setShowTopButtons(
false);
626 $form->setTitle($this->lng->txt(
"login_to_ilias"));
628 include_once
'./Services/Authentication/classes/class.ilAuthModeDetermination.php';
632 $visible_auth_methods = array();
635 if (isset($option[
'hide_in_ui']) && $option[
'hide_in_ui']) {
640 $radg->addOption($op1);
641 if (isset($option[
'checked'])) {
642 $radg->setValue(
$key);
644 $visible_auth_methods[] = $op1;
647 if (count($visible_auth_methods) == 1) {
648 $first_auth_method = current($visible_auth_methods);
650 $hidden_auth_method->setValue($first_auth_method->getValue());
651 $form->addItem($hidden_auth_method);
653 $form->addItem($radg);
657 $ti =
new ilTextInputGUI($this->lng->txt(
"username"),
"username");
659 $ti->setRequired(
true);
663 $pi->setUseStripSlashes(
false);
664 $pi->setRetype(
false);
665 $pi->setSkipSyntaxCheck(
true);
667 $pi->setDisableHtmlAutoComplete(
false);
668 $pi->setRequired(
true);
671 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
672 if (ilCaptchaUtil::isActiveForLogin()) {
673 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
674 $captcha =
new ilCaptchaInputGUI($this->lng->txt(
'captcha_code'),
'captcha_code');
675 $captcha->setRequired(
true);
676 $form->addItem($captcha);
679 $form->addCommandButton(
"doStandardAuthentication", $this->lng->txt(
"log_in"));
689 $this->
getLogger()->debug(
'Trying shibboleth authentication');
691 include_once
'./Services/AuthShibboleth/classes/class.ilAuthFrontendCredentialsShibboleth.php';
693 $credentials->initFromRequest();
695 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
699 include_once
'./Services/Authentication/classes/class.ilAuthStatus.php';
702 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
705 $frontend = $frontend_factory->getFrontend(
712 $frontend->authenticate();
714 switch ($status->getStatus()) {
717 include_once
'./Services/Init/classes/class.ilInitialisation.php';
718 ilInitialisation::redirectToStartingPage();
722 return $GLOBALS[
'ilCtrl']->redirect($this,
'showAccountMigration');
726 $GLOBALS[
'ilCtrl']->redirect($this,
'showLoginPage');
742 $this->
getLogger()->debug(
'Trying cas authentication');
744 include_once
'./Services/CAS/classes/class.ilAuthFrontendCredentialsCAS.php';
747 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
751 include_once
'./Services/Authentication/classes/class.ilAuthStatus.php';
754 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
757 $frontend = $frontend_factory->getFrontend(
764 $frontend->authenticate();
765 switch ($status->getStatus()) {
767 $this->
getLogger()->debug(
'Authentication successful.');
768 ilInitialisation::redirectToStartingPage();
784 $this->
getLogger()->debug(
'Trying lti authentication');
787 $credentials->initFromRequest();
796 $frontend = $frontend_factory->getFrontend(
803 $frontend->authenticate();
805 switch ($status->getStatus()) {
808 ilInitialisation::redirectToStartingPage();
812 return $GLOBALS[
'ilCtrl']->redirect($this,
'showAccountMigration');
816 $GLOBALS[
'ilCtrl']->redirect($this,
'showLoginPage');
831 $this->
getLogger()->debug(
'Trying apache authentication');
833 $credentials = new \ilAuthFrontendCredentialsApache($this->httpRequest, $this->ctrl);
834 $credentials->initFromRequest();
836 $provider_factory = new \ilAuthProviderFactory();
841 $frontend_factory = new \ilAuthFrontendFactory();
843 $frontend = $frontend_factory->getFrontend(
850 $frontend->authenticate();
852 switch ($status->getStatus()) {
853 case \ilAuthStatus::STATUS_AUTHENTICATED:
854 if ($credentials->hasValidTargetUrl()) {
856 'Authentication successful. Redirecting to starting page: %s',
857 $credentials->getTargetUrl()
859 $this->ctrl->redirectToURL($credentials->getTargetUrl());
862 'Authentication successful, but no valid target URL given. Redirecting to default starting page.'
864 \ilInitialisation::redirectToStartingPage();
868 case \ilAuthStatus::STATUS_ACCOUNT_MIGRATION_REQUIRED:
869 $this->ctrl->redirect($this,
'showAccountMigration');
872 case \ilAuthStatus::STATUS_AUTHENTICATION_FAILED:
875 $this->ctrl->getLinkTarget($this,
'showLoginPage',
'',
false,
false),
892 if (
$form->checkInput()) {
893 $this->
getLogger()->debug(
'Trying to authenticate user.');
895 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
897 $credentials->setUsername(
$form->getInput(
'username'));
898 $credentials->setPassword(
$form->getInput(
'password'));
899 $credentials->setCaptchaCode(
$form->getInput(
'captcha_code'));
902 include_once
'./Services/Authentication/classes/class.ilAuthModeDetermination.php';
905 $credentials->setAuthMode(
$form->getInput(
'auth_mode'));
908 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
910 $providers = $provider_factory->getProviders($credentials);
912 include_once
'./Services/Authentication/classes/class.ilAuthStatus.php';
915 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
918 $frontend = $frontend_factory->getFrontend(
925 $frontend->authenticate();
927 switch ($status->getStatus()) {
930 include_once
'./Services/Init/classes/class.ilInitialisation.php';
931 ilInitialisation::redirectToStartingPage();
938 return $GLOBALS[
'ilCtrl']->redirect($this,
'showAccountMigration');
982 return $page_editor_html;
994 if (strlen($page_editor_html)) {
996 return $page_editor_html;
999 $loginSettings =
new ilSetting(
"login_settings");
1000 $information = $loginSettings->get(
"login_message_" .
$lng->getLangKey());
1002 if (strlen(trim($information))) {
1003 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
1005 return $page_editor_html;
1021 $tpl =
new ilTemplate(
'tpl.login_form_cas.html',
true,
true,
'Services/Init');
1022 $tpl->setVariable(
"TXT_CAS_LOGIN",
$lng->txt(
"login_to_ilias_via_cas"));
1024 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"cas_login_instructions"));
1025 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
1026 $tpl->setVariable(
"TARGET_CAS_LOGIN", $this->ctrl->getLinkTarget($this,
"doCasAuthentication"));
1027 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
1033 '[list-cas-login-form]',
1037 return $page_editor_html;
1054 $tpl =
new ilTemplate(
'tpl.login_form_shibboleth.html',
true,
true,
'Services/Init');
1056 $tpl->setVariable(
'SHIB_FORMACTION',
'./shib_login.php');
1058 if (
$ilSetting->get(
"shib_hos_type") ==
'external_wayf') {
1059 $tpl->setCurrentBlock(
"shibboleth_login");
1060 $tpl->setVariable(
"TXT_SHIB_LOGIN",
$lng->txt(
"login_to_ilias_via_shibboleth"));
1061 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
1062 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME",
$ilSetting->get(
"shib_federation_name"));
1063 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON",
$ilSetting->get(
"shib_login_button"));
1064 $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>.');
1065 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"shib_login_instructions"));
1066 $tpl->parseCurrentBlock();
1067 } elseif (
$ilSetting->get(
"shib_hos_type") ==
'embedded_wayf') {
1068 $tpl->setCurrentBlock(
"shibboleth_custom_login");
1069 $customInstructions = stripslashes(
$ilSetting->get(
"shib_login_instructions"));
1070 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
1071 $tpl->parseCurrentBlock();
1073 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
1074 $tpl->setVariable(
"TXT_SHIB_LOGIN",
$lng->txt(
"login_to_ilias_via_shibboleth"));
1075 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME",
$ilSetting->get(
"shib_federation_name"));
1076 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf(
$lng->txt(
"shib_select_home_organization"),
$ilSetting->get(
"shib_federation_name")));
1077 $tpl->setVariable(
"TXT_CONTINUE",
$lng->txt(
"btn_next"));
1078 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION",
$lng->txt(
"shib_home_organization"));
1079 $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>.');
1080 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",
$ilSetting->get(
"shib_login_instructions"));
1082 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
1085 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
1086 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
1087 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
1088 $tpl->parseCurrentBlock();
1094 return $page_editor_html;
1109 if (!strlen($page_editor_html)) {
1110 $tpl->setVariable($fallback_tplvar, $element_html);
1111 return $page_editor_html;
1114 if (!stristr($page_editor_html, $placeholder)) {
1115 $tpl->setVariable($fallback_tplvar, $element_html);
1116 return $page_editor_html;
1118 return str_replace($placeholder, $element_html, $page_editor_html);
1129 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
1131 $active_lang = $lpe->getIliasEditorLanguage(
$lng->getLangKey());
1133 if (!$active_lang) {
1138 include_once
'./Services/COPage/classes/class.ilPageUtil.php';
1143 include_once
'./Services/Authentication/classes/class.ilLoginPage.php';
1144 include_once
'./Services/Authentication/classes/class.ilLoginPageGUI.php';
1146 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1148 $tpl->setCurrentBlock(
"SyntaxStyle");
1150 $tpl->parseCurrentBlock();
1155 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1156 $page_gui->setStyleId(0,
'auth');
1158 $page_gui->setPresentationTitle(
"");
1159 $page_gui->setTemplateOutput(
false);
1160 $page_gui->setHeader(
"");
1161 $ret = $page_gui->showPage();
1178 $rtpl =
new ilTemplate(
'tpl.login_registration_links.html',
true,
true,
'Services/Init');
1181 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1183 $rtpl->setCurrentBlock(
"new_registration");
1184 $rtpl->setVariable(
"REGISTER",
$lng->txt(
"registration"));
1187 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
"")
1189 $rtpl->parseCurrentBlock();
1192 if (
$ilSetting->get(
"password_assistance")) {
1193 $rtpl->setCurrentBlock(
"password_assistance");
1194 $rtpl->setVariable(
"FORGOT_PASSWORD",
$lng->txt(
"forgot_password"));
1195 $rtpl->setVariable(
"FORGOT_USERNAME",
$lng->txt(
"forgot_username"));
1197 "CMD_FORGOT_PASSWORD",
1198 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"")
1201 "CMD_FORGOT_USERNAME",
1202 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm")
1204 $rtpl->setVariable(
"LANG_ID",
$lng->getLangKey());
1205 $rtpl->parseCurrentBlock();
1209 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
"read",
"", ROOT_FOLDER_ID)) {
1210 $rtpl->setCurrentBlock(
"homelink");
1211 $rtpl->setVariable(
"CLIENT_ID",
"?client_id=" .
$_COOKIE[
"ilClientId"] .
"&lang=" .
$lng->getLangKey());
1212 $rtpl->setVariable(
"TXT_HOME",
$lng->txt(
"home"));
1213 $rtpl->parseCurrentBlock();
1217 $rtpl->setCurrentBlock(
"client_list");
1218 $rtpl->setVariable(
"TXT_CLIENT_LIST",
$lng->txt(
"to_client_list"));
1219 $rtpl->setVariable(
"CMD_CLIENT_LIST", $this->ctrl->getLinkTarget($this,
"showClientList"));
1220 $rtpl->parseCurrentBlock();
1227 '[list-registration-link]',
1228 'REG_PWD_CLIENT_LINKS'
1239 if (!$this->
user->getId()) {
1240 $this->
user->setId(ANONYMOUS_USER_ID);
1244 $utpl =
new ilTemplate(
'tpl.login_terms_of_service_link.html',
true,
true,
'Services/Init');
1245 $utpl->setVariable(
'TXT_TERMS_OF_SERVICE', $this->lng->txt(
'usr_agreement'));
1246 $utpl->setVariable(
'LINK_TERMS_OF_SERVICE', $this->ctrl->getLinkTarget($this,
'showTermsOfService'));
1252 '[list-user-agreement]',
1261 '[list-user-agreement]',
1275 '[list-language-selection] ',
1276 '[list-registration-link]',
1277 '[list-user-agreement]',
1278 '[list-login-form]',
1279 '[list-cas-login-form]',
1280 '[list-shibboleth-login-form]'
1282 array(
'',
'',
'',
'',
'',
'',
''),
1291 public function showAccountMigration($a_message =
'')
1299 $lng->loadLanguageModule(
'auth');
1300 self::initStartUpTemplate(
'tpl.login_account_migration.html');
1302 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
1304 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
1306 $form->setTitle(
$lng->txt(
'auth_account_migration'));
1307 $form->addCommandButton(
'migrateAccount',
$lng->txt(
'save'));
1308 $form->addCommandButton(
'showLogin',
$lng->txt(
'cancel'));
1314 $lng->txt(
'auth_account_migration_keep'),
1315 static::ACCOUNT_MIGRATION_MIGRATE,
1316 $lng->txt(
'auth_info_migrate')
1319 $user->setRequired(
true);
1322 $user->setMaxLength(128);
1323 $keep->addSubItem(
$user);
1326 $pass->setRetype(
false);
1327 $pass->setRequired(
true);
1330 $pass->setMaxLength(128);
1331 $keep->addSubItem(
$pass);
1332 $rad->addOption($keep);
1335 $lng->txt(
'auth_account_migration_new'),
1336 static::ACCOUNT_MIGRATION_NEW,
1337 $lng->txt(
'auth_info_add')
1339 $rad->addOption($new);
1341 $form->addItem($rad);
1343 $tpl->setVariable(
'MIG_FORM',
$form->getHTML());
1345 if (strlen($a_message)) {
1349 $tpl->show(
'DEFAULT');
1358 if (!isset(
$_POST[
'account_migration'])) {
1359 $this->showAccountMigration(
1360 $GLOBALS[
'DIC']->language()->txt(
'err_choose_migration_type')
1366 (
$_POST[
'account_migration'] == self::ACCOUNT_MIGRATION_MIGRATE) &&
1367 (!strlen(
$_POST[
'mig_username']) || !strlen(
$_POST[
'mig_password']))
1369 $this->showAccountMigration(
1370 $GLOBALS[
'DIC']->language()->txt(
'err_wrong_login')
1375 if ((
int)
$_POST[
'account_migration'] == self::ACCOUNT_MIGRATION_MIGRATE) {
1378 if ((
int)
$_POST[
'account_migration'] == static::ACCOUNT_MIGRATION_NEW) {
1388 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontend.php';
1390 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
1394 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
1398 $this->logger->debug(
'Using provider: ' . get_class(
$provider) .
' for further processing.');
1400 include_once
'./Services/Authentication/classes/class.ilAuthStatus.php';
1403 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
1406 $frontend = $frontend_factory->getFrontend(
1413 if ($frontend->migrateAccountNew()) {
1414 include_once
'./Services/Init/classes/class.ilInitialisation.php';
1415 ilInitialisation::redirectToStartingPage();
1419 $this->ctrl->redirect($this,
'showAccountMigration');
1430 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1432 $this->logger->debug(
'Starting account migration for user: ' . (
string)
ilSession::get(
'mig_ext_account'));
1435 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
1437 $credentials->setUsername((
string)
$_POST[
'mig_username']);
1438 $credentials->setPassword((
string)
$_POST[
'mig_password']);
1440 include_once
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
1444 include_once
'./Services/Authentication/classes/class.ilAuthStatus.php';
1447 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
1450 $frontend = $frontend_factory->getFrontend(
1457 $frontend->authenticate();
1459 switch ($status->getStatus()) {
1461 $this->
getLogger()->debug(
'Account migration: authentication successful for ' . (
string) $_POST[
'mig_username']);
1463 $provider = $provider_factory->getProviderByAuthMode(
1468 $frontend = $frontend_factory->getFrontend(
1475 $frontend->migrateAccount(
$GLOBALS[
'DIC'][
'ilAuthSession'])
1477 include_once
'./Services/Init/classes/class.ilInitialisation.php';
1478 ilInitialisation::redirectToStartingPage();
1481 $this->ctrl->redirect($this,
'showAccountMigration');
1486 $this->
getLogger()->info(
'Account migration failed for user ' . (
string) $_POST[
'mig_username']);
1487 $this->showAccountMigration(
$GLOBALS[
'lng']->txt(
'err_wrong_login'));
1506 $ilAppEventHandler =
$DIC[
'ilAppEventHandler'];
1508 $ilAppEventHandler->raise(
1509 'Services/Authentication',
1512 'user_id' => $this->
user->getId()
1517 $GLOBALS[
'DIC'][
'ilAuthSession']->logout();
1519 $GLOBALS[
'ilAppEventHandler']->raise(
1520 'Services/Authentication',
1523 'username' => $this->
user->getLogin()
1532 ilUtil::redirect(
'saml.php?action=logout&logout_url=' . urlencode(ILIAS_HTTP_PATH .
'/login.php'));
1536 self::initStartUpTemplate(
"tpl.logout.html");
1539 $tpl->setCurrentBlock(
"homelink");
1540 $tpl->setVariable(
"CLIENT_ID",
"?client_id=" .
$client_id .
"&lang=" .
$lng->getLangKey());
1541 $tpl->setVariable(
"TXT_HOME",
$lng->txt(
"home"));
1542 $tpl->parseCurrentBlock();
1546 $tpl->setCurrentBlock(
"client_list");
1547 $tpl->setVariable(
"TXT_CLIENT_LIST",
$lng->txt(
"to_client_list"));
1548 $this->ctrl->setParameter($this,
"client_id",
$client_id);
1551 $this->ctrl->getLinkTarget($this,
"showClientList")
1553 $tpl->parseCurrentBlock();
1554 $this->ctrl->setParameter($this,
"client_id",
"");
1557 $tpl->setVariable(
"TXT_PAGEHEADLINE",
$lng->txt(
"logout"));
1558 $tpl->setVariable(
"TXT_LOGOUT_TEXT",
$lng->txt(
"logout_text"));
1559 $tpl->setVariable(
"TXT_LOGIN",
$lng->txt(
"login_to_ilias"));
1560 $tpl->setVariable(
"CLIENT_ID",
"?client_id=" .
$client_id .
"&lang=" .
$lng->getLangKey());
1579 $tpl->setAddFooter(
false);
1581 $tpl->setVariable(
"PAGETITLE",
$lng->txt(
"clientlist_clientlist"));
1585 self::initStartUpTemplate(
"tpl.client_list.html");
1588 $tpl->addBlockfile(
"CLIENT_LIST",
"client_list",
"tpl.table.html");
1591 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
1594 require_once(
"setup/classes/class.ilClientList.php");
1595 require_once(
"setup/classes/class.ilClient.php");
1596 require_once(
"setup/classes/class.ilDBConnections.php");
1597 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1600 $list = $clientlist->getClients();
1602 if (count(
$list) == 0) {
1603 header(
"Location: ./setup/setup.php");
1607 $hasPublicSection =
false;
1610 if (
$client->checkDatabaseExists(
true)) {
1612 if (
$client->ini->readVariable(
"client",
"access") and
$client->getSetting(
"setup_ok")) {
1613 $this->ctrl->setParameter($this,
"client_id",
$key);
1616 $tmp[] =
"<a href=\"" .
"login.php?cmd=force_login&client_id=" . urlencode(
$key) .
"\">" .
$lng->txt(
"clientlist_login_page") .
"</a>";
1618 if (
$client->getSetting(
'pub_section')) {
1619 $hasPublicSection =
true;
1620 $tmp[] =
"<a href=\"" .
"ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode(
$key) .
"\">" .
$lng->txt(
"clientlist_start_page") .
"</a>";
1634 if ($hasPublicSection) {
1635 $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
1636 $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"),
$lng->txt(
"clientlist_login"),
$lng->txt(
"clientlist_public_access")));
1637 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
1638 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
1640 $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
1641 $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"),
$lng->txt(
"clientlist_login"),
''));
1642 $tbl->setHeaderVars(array(
"name",
"login",
''));
1643 $tbl->setColumnWidth(array(
"70%",
"25%",
'1px'));
1647 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
1648 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1655 $tbl->disable(
"icon");
1656 $tbl->disable(
"numinfo");
1657 $tbl->disable(
"sort");
1658 $tbl->disable(
"footer");
1662 $tpl->show(
"DEFAULT",
true,
true);
1674 $str =
"<p style=\"margin:15px;\">
1675 You need to enable Session Cookies in your Browser to use ILIAS.
1678 <br/>Tools -> Options -> Privacy -> Cookies
1679 <br/>Enable 'Allow sites to set cookies' and activate option 'Keep
1680 <br/>cookies' auf 'until I close Firefox'
1682 <br/><b>Mozilla/Netscape</b>
1683 <br/>Edit -> Preferences -> Privacy&Security -> Cookies
1684 <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current
1687 <br/><b>Internet Explorer</b>
1688 <br/>Tools -> Internet Options -> Privacy -> Advanced
1689 <br/>- Check 'Override automatic cookie handling'
1690 <br/>- Check 'Always allow session cookies'
1692 $tpl->setVariable(
"CONTENT", $str);
1709 $back_to_login = (
'getAcceptance' != $this->ctrl->getCmd());
1711 if (!$this->
user->getId()) {
1712 $this->
user->setId(ANONYMOUS_USER_ID);
1715 self::initStartUpTemplate(
'tpl.view_terms_of_service.html', $back_to_login, !$back_to_login);
1716 $this->mainTemplate->setVariable(
'TXT_PAGEHEADLINE', $this->lng->txt(
'usr_agreement'));
1719 if ($handleDocument) {
1720 $document = $this->termsOfServiceEvaluation->document();
1721 if (
'getAcceptance' == $this->ctrl->getCmd()) {
1722 if (isset(
$_POST[
'status']) &&
'accepted' ==
$_POST[
'status']) {
1723 $helper = new \ilTermsOfServiceHelper();
1725 $helper->trackAcceptance($this->
user, $document);
1736 $this->mainTemplate->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this, $this->ctrl->getCmd()));
1737 $this->mainTemplate->setVariable(
'ACCEPT_CHECKBOX',
ilUtil::formCheckbox(0,
'status',
'accepted'));
1738 $this->mainTemplate->setVariable(
'ACCEPT_TERMS_OF_SERVICE', $this->lng->txt(
'accept_usr_agreement'));
1739 $this->mainTemplate->setVariable(
'TXT_SUBMIT', $this->lng->txt(
'submit'));
1742 $this->mainTemplate->setPermanentLink(
'usr',
null,
'agreement');
1743 $this->mainTemplate->setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->content());
1745 $this->mainTemplate->setVariable(
1746 'TERMS_OF_SERVICE_CONTENT',
1748 $this->lng->txt(
'no_agreement_description'),
1754 $this->mainTemplate->show();
1765 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isValid()) {
1766 include_once
'./Services/Init/classes/class.ilInitialisation.php';
1767 ilInitialisation::redirectToStartingPage();
1773 !isset(
$_GET[
"client_id"]) &&
1774 (
$_GET[
"cmd"] ==
"") &&
1790 global $objDefinition, $ilPluginAdmin,
$ilUser;
1793 if (is_object($ilPluginAdmin)) {
1795 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
1798 foreach ($pl_names as $pl) {
1800 $gui_class = $ui_plugin->getUIClassInstance();
1801 $resp = $gui_class->checkGotoHook($a_target);
1802 if ($resp[
"target"] !==
false) {
1803 $a_target = $resp[
"target"];
1809 if ($a_target ==
"") {
1813 $t_arr = explode(
"_", $a_target);
1816 if (
$type ==
"git") {
1824 $class = $objDefinition->getClassName(
$type);
1830 $full_class =
"ilObj" . $class .
"Access";
1831 include_once(
$location .
"/class." . $full_class .
".php");
1833 $ret = call_user_func(array($full_class,
"_checkGoto"), $a_target);
1837 !stristr($a_target,
"_wsp") &&
1838 $ilUser->getId() != ANONYMOUS_USER_ID &&
1839 !$objDefinition->isAdministrationObject(
$type) &&
1840 $objDefinition->isRBACObject(
$type) &&
1842 global
$tree, $rbacsystem, $ilAccess;
1845 if ($t_arr[0] ==
"pg") {
1846 if (isset($t_arr[2])) {
1847 $ref_id = $t_arr[2];
1852 $ref_id = array_shift($ref_id);
1856 $ref_id = $t_arr[1];
1859 include_once
"Services/Membership/classes/class.ilParticipants.php";
1860 $block_obj = array();
1865 foreach (
$path as $path_ref_id) {
1866 $redirect_infopage =
false;
1867 $add_member_role =
false;
1873 if (!$ilAccess->checkAccess(
1880 } elseif ($ptype ==
"crs") {
1882 include_once
"Modules/Course/classes/class.ilCourseParticipant.php";
1884 if (!$participants->isAssigned()) {
1886 include_once
"Modules/Course/classes/class.ilObjCourse.php";
1889 $block_obj[] = $path_ref_id;
1890 $add_member_role =
true;
1892 $redirect_infopage =
true;
1895 } elseif ($ptype ==
"grp") {
1897 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
1900 include_once
"Modules/Group/classes/class.ilObjGroup.php";
1902 if ($group_obj->isRegistrationEnabled()) {
1903 $block_obj[] = $path_ref_id;
1904 $add_member_role =
true;
1906 $redirect_infopage =
true;
1912 if ($add_member_role) {
1914 $rbacsystem->resetPACache(
$ilUser->getId(), $path_ref_id);
1915 if (!$rbacsystem->checkAccess(
"join", $path_ref_id)) {
1916 $redirect_infopage =
true;
1918 $rbacsystem->addTemporaryRole(
1926 if ($redirect_infopage) {
1927 if ($rbacsystem->checkAccess(
"visible", $path_ref_id)) {
1929 "&ref_id=" . $path_ref_id .
"&cmd=infoScreen");
1938 $rbacsystem->resetPACache(
$ilUser->getId(), $ref_id);
1939 if ($rbacsystem->checkAccess(
"read", $ref_id) &&
sizeof($block_obj)) {
1945 $_SESSION[
"pending_goto"] =
"goto.php?target=" . $a_target;
1949 "&ref_id=" . array_shift($block_obj));
1956 public function confirmRegistration()
1960 if (!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh']))) {
1961 $this->ctrl->redirectToURL(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1970 $user->setActive(
true);
1972 if ($oRegSettings->passwordGenerationEnabled()) {
1976 $user->setLastPasswordChangeTS(time());
1991 $accountMail->withEmailConfirmationRegistrationMode()->send(
$user,
$password);
1993 $this->ctrl->redirectToURL(sprintf(
1994 './login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful&lang=%s',
1995 $user->getLanguage()
1999 $soap_client->setResponseTimeout(1);
2000 $soap_client->enableWSDL(
true);
2001 $soap_client->init();
2003 $this->logger->info(
'Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
2006 'deleteExpiredDualOptInUserObjects',
2009 $exception->getCode()
2013 $this->ctrl->redirectToURL(sprintf(
2014 './login.php?cmd=force_login®_confirmation_msg=%s',
2015 $exception->getMessage()
2018 $this->ctrl->redirectToURL(sprintf(
2019 './login.php?cmd=force_login®_confirmation_msg=%s',
2020 $exception->getMessage()
2031 public static function initStartUpTemplate($a_tmpl, $a_show_back =
false, $a_show_logout =
false)
2043 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
2047 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
2050 $tpl->addBlockfile(
'CONTENT',
'content',
'tpl.startup_screen.html',
'Services/Init');
2053 $tpl->setVariable(
"LOGO_TITLE",
$lng->txt(
"logo"));
2057 $param =
'client_id=' .
$_COOKIE[
'ilClientId'] .
'&lang=' .
$lng->getLangKey();
2059 $tpl->setCurrentBlock(
'link_item_bl');
2060 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'login_to_ilias'));
2061 $tpl->setVariable(
'LINK_URL',
'login.php?cmd=force_login&' . $param);
2062 $tpl->parseCurrentBlock();
2064 include_once
'./Services/Init/classes/class.ilPublicSectionSettings.php';
2066 $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID,
'read',
'', ROOT_FOLDER_ID)) {
2067 $tpl->setVariable(
'LINK_URL',
'index.php?' . $param);
2068 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'home'));
2069 $tpl->parseCurrentBlock();
2071 } elseif ($a_show_logout) {
2072 $tpl->setCurrentBlock(
'link_item_bl');
2073 $tpl->setVariable(
'LINK_TXT',
$lng->txt(
'logout'));
2074 $tpl->setVariable(
'LINK_URL', ILIAS_HTTP_PATH .
'/logout.php');
2075 $tpl->parseCurrentBlock();
2078 if (is_array($a_tmpl)) {
2079 $template_file = $a_tmpl[0];
2080 $template_dir = $a_tmpl[1];
2082 $template_file = $a_tmpl;
2083 $template_dir =
'Services/Init';
2087 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
2088 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
2089 if (trim($header_top_title) !=
"" &&
$tpl->blockExists(
"header_top_title")) {
2090 $tpl->setCurrentBlock(
"header_top_title");
2091 $tpl->setVariable(
"TXT_HEADER_TITLE", $header_top_title);
2092 $tpl->parseCurrentBlock();
2098 $tpl->setCurrentBlock(
"lang_select");
2099 $tpl->setVariable(
"TXT_LANGSELECT",
$lng->txt(
"language"));
2100 $tpl->setVariable(
"LANG_SELECT", $selection);
2101 $tpl->parseCurrentBlock();
2104 $tpl->addBlockFile(
'STARTUP_CONTENT',
'startup_content', $template_file, $template_dir);
2113 include_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
2123 require_once
'Services/Saml/classes/class.ilSamlIdp.php';
2124 require_once
'Services/Saml/classes/class.ilSamlSettings.php';
2127 $tpl =
new ilTemplate(
'tpl.login_form_saml.html',
true,
true,
'Services/Saml');
2130 if (isset(
$_GET[
'target'])) {
2134 $tpl->setVariable(
'SAML_SCRIPT_URL',
'./saml.php' . $return);
2135 $tpl->setVariable(
'TXT_LOGIN',
$GLOBALS[
'DIC']->language()->txt(
'saml_log_in'));
2136 $tpl->setVariable(
'LOGIN_TO_ILIAS_VIA_SAML',
$GLOBALS[
'DIC']->language()->txt(
'login_to_ilias_via_saml'));
2137 $tpl->setVariable(
'TXT_SAML_LOGIN_TXT',
$GLOBALS[
'DIC']->language()->txt(
'saml_login_form_txt'));
2138 $tpl->setVariable(
'TXT_SAML_LOGIN_INFO_TXT',
$GLOBALS[
'DIC']->language()->txt(
'saml_login_form_info_txt'));
2144 '[list-saml-login-form]',
2149 return $page_editor_html;
2163 if ($oidc_settings->getActive()) {
2164 $tpl =
new ilTemplate(
'tpl.login_element.html',
true,
true,
'Services/OpenIdConnect');
2166 $lang->loadLanguageModule(
'auth');
2167 $tpl->setVariable(
'TXT_OIDCONNECT_HEADER',
$lang->txt(
'auth_oidc_login_element_info'));
2169 $target = empty(
$_GET[
'target']) ?
'' : (
'?target=' . (string)
$_GET[
'target']);
2170 switch ($oidc_settings->getLoginElementType()) {
2174 $tpl->setVariable(
'SCRIPT_OIDCONNECT_T', ILIAS_HTTP_PATH .
'/openidconnect.php' .
$target);
2175 $tpl->setVariable(
'TXT_OIDC', $oidc_settings->getLoginElemenText());
2179 $tpl->setVariable(
'SCRIPT_OIDCONNECT_I', ILIAS_HTTP_PATH .
'/openidconnect.php' .
$target);
2180 $tpl->setVariable(
'IMG_SOURCE', $oidc_settings->getImageFilePath());
2185 $DIC->ui()->mainTemplate(),
2188 '[list-openid-connect-login]',
2189 'OPEN_ID_CONNECT_LOGIN_FORM'
2193 return $page_editor_html;
2203 $this->
getLogger()->debug(
'Trying openid connect authentication');
2206 $credentials->initFromRequest();
2215 $frontend = $frontend_factory->getFrontend(
2222 $frontend->authenticate();
2224 switch ($status->getStatus()) {
2227 include_once
'./Services/Init/classes/class.ilInitialisation.php';
2228 ilInitialisation::redirectToStartingPage();
2233 $GLOBALS[
'ilCtrl']->redirect($this,
'showLoginPage');
2250 $this->
getLogger()->debug(
'Trying saml authentication');
2252 $request = $DIC->http()->request();
2255 require_once
'Services/Saml/classes/class.ilSamlAuthFactory.php';
2266 if (isset(
$params[
'returnTo'])) {
2272 if (!
$auth->isAuthenticated()) {
2274 if (!isset(
$_GET[
'idpentityid']) || !isset(
$_GET[
'saml_idp_id'])) {
2276 if (1 == count($activeIdps)) {
2277 $idp = current($activeIdps);
2278 $_GET[
'idpentityid'] =
$idp->getEntityId();
2279 $_GET[
'saml_idp_id'] =
$idp->getIdpId();
2282 'Found exactly one active IDP with id %s: %s',
2286 } elseif (0 == count($activeIdps)) {
2288 $GLOBALS[
'DIC']->ctrl()->redirect($this,
'showLoginPage');
2296 $auth->storeParam(
'idpId', (
int)
$_GET[
'saml_idp_id']);
2298 'Stored relevant IDP id in session: %s',
2299 (
string)
$auth->getParam(
'idpId')
2308 $auth->protectResource();
2311 'SAML authentication successful, continuing with ILIAS internal authentication process...'
2314 $idpId = (int)
$auth->getParam(
'idpId');
2317 'Internal SAML IDP id fetched from session: %s',
2323 'No valid internal IDP id found (most probably due to IDP initiated SSO), trying fallback determination...'
2329 'Searching active ILIAS IDP by entity id "%s" results in: %s',
2335 'Could not execute fallback determination, no IDP entity ID found SAML authentication session data'
2343 require_once
'Services/Saml/classes/class.ilAuthFrontendCredentialsSaml.php';
2345 $credentials->initFromRequest();
2347 require_once
'Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
2351 require_once
'Services/Authentication/classes/class.ilAuthStatus.php';
2354 require_once
'Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
2357 $frontend = $frontend_factory->getFrontend(
2364 $frontend->authenticate();
2366 switch ($status->getStatus()) {
2369 require_once
'Services/Init/classes/class.ilInitialisation.php';
2370 return ilInitialisation::redirectToStartingPage();
2373 return $GLOBALS[
'DIC']->ctrl()->redirect($this,
'showAccountMigration');
2377 $GLOBALS[
'DIC']->ctrl()->redirect($this,
'showLoginPage');
2395 self::initStartUpTemplate(array(
'tpl.saml_idp_selection.html',
'Services/Saml'));
2397 $mainTpl =
$DIC->ui()->mainTemplate();
2399 $renderer =
$DIC->ui()->renderer();
2401 $DIC->ctrl()->setTargetScript(
'saml.php');
2405 require_once
'Services/Saml/classes/class.ilSamlIdpSelectionTableGUI.php';
2408 foreach ($idps as
$idp) {
2409 $DIC->ctrl()->setParameter($this,
'saml_idp_id',
$idp->getIdpId());
2410 $DIC->ctrl()->setParameter($this,
'idpentityid', urlencode(
$idp->getEntityId()));
2413 'idp_link' => $renderer->render(
$factory->link()->standard(
$idp->getEntityId(),
$DIC->ctrl()->getLinkTarget($this,
'doSamlAuthentication')))
2418 $mainTpl->setVariable(
'CONTENT',
$table->getHtml());
2420 $mainTpl->fillWindowTitle();
2421 $mainTpl->fillCssFiles();
2422 $mainTpl->fillJavaScriptFiles();
2423 $mainTpl->show(
'DEFAULT',
false);
foreach($paths as $path) $request
An exception for terminatinating execution or to throw for unit testing.
const AUTH_SOAP_NO_ILIAS_USER
const AUTH_OPENID_CONNECT
const AUTH_USER_SIMULTANEOUS_LOGIN
const AUTH_CAPTCHA_INVALID
const AUTH_CAS_NO_ILIAS_USER
const AUTH_RADIUS_NO_ILIAS_USER
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.
Class ilAccountRegistrationMail.
Description of class class.
Auth frontend credentials for CAS auth.
Auth credentials for lti oauth based authentication.
Class ilOpenIdConnectSettingsGUI.
Class ilAuthFrontendCredentialsSaml.
Description of class class.
Description of class class.
Factory for auth frontend classes.
const CONTEXT_STANDARD_FORM
const MIG_EXTERNAL_ACCOUNT
const MIG_TRIGGER_AUTHMODE
static getInstance()
Get singelton instance.
static _getInstance()
Get instance.
const STATUS_CODE_ACTIVATION_REQUIRED
const STATUS_AUTHENTICATED
static getInstance()
Get status instance.
const STATUS_AUTHENTICATION_FAILED
const STATUS_ACCOUNT_MIGRATION_REQUIRED
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()
go to public section
static _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.
static getLanguageSelection($a_in_topbar=false)
static _registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
static _isActivated($a_obj_id)
Is activated.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static _verifyRegistrationHash($a_hash)
Verifies a registration hash.
static _lookupLogin($a_user_id)
lookup login
static _lookupId($a_user_str)
Lookup id by login.
static 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
const LOGIN_ELEMENT_TYPE_IMG
static getInstance()
Get singleton instance.
const LOGIN_ELEMENT_TYPE_TXT
static _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.
static getInstance()
Get instance.
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.
static _lookupRegistrationType()
Class ilSamlIdpSelectionTableGUI.
static getActiveIdpList()
static geIdpIdByEntityId($entityId)
const SESSION_CLOSE_CAPTCHA
static set($a_var, $a_val)
Set a value.
static setClosingContext($a_context)
set closing context (for statistics)
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.
showLoginPage(ilPropertyFormGUI $form=null)
showCASLoginForm($page_editor_html)
Show cas login @global ilSetting $ilSetting.
static _checkGoto($a_target)
doStandardAuthentication()
Check form input; authenticate user.
getAcceptance()
Get terms of service.
doApacheAuthentication()
Try apache auth.
showCodeForm($a_username=null, $a_form=null)
doOpenIdConnectAuthentication()
do open id connect authentication
doMigration()
Do migration of existing ILIAS database user account.
const ACCOUNT_MIGRATION_MIGRATE
purgePlaceholders($page_editor_html)
Purge page editor html from unused placeholders.
initStandardLoginForm()
Initialize the standard.
doShibbolethAuthentication()
Trying shibboleth authentication.
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
__construct(\ilObjUser $user=null, \ilTermsOfServiceDocumentEvaluation $termsOfServiceEvaluation=null, \ilTemplate $mainTemplate=null, ServerRequestInterface $httpRequest=null)
ilStartUpGUI constructor.
const ACCOUNT_MIGRATION_NEW
jumpToPasswordAssistance()
jump to password assistance
showLogout()
show logout screen
showSamlIdpSelection(\ilSamlAuth $auth, array $idps)
doLTIAuthentication()
Handle lti requests.
jumpToRegistration()
jump to registration gui
showLoginForm($page_editor_html, ilPropertyFormGUI $form=null)
Show login form @global ilSetting $ilSetting.
executeCommand()
execute command
$termsOfServiceEvaluation
getLoginPageEditorHTML()
Get HTML of ILIAS login page editor.
initCodeForm($a_username)
showTermsOfService()
Show terms of service.
showLoginInformation($page_editor_html)
Show login information.
doCasAuthentication()
Try CAS auth.
showNoCookiesScreen()
show help screen, if cookies are disabled
showOpenIdConnectLoginForm($page_editor_html)
showRegistrationLinks($page_editor_html)
Show registration, password forgotten, client slection links @global ilLanguage $lng @global ilSettin...
showTermsOfServiceLink(string $page_editor_html)
Show terms of service link.
doMigrationNewAccount()
Create new account for migration.
showSamlLoginForm($page_editor_html)
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
static init($a_tpl=null)
Init.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
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 getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_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)
inits and adds the jQuery JS-File to the global or a passed template
if($_SERVER['argc']< 4) $client
Representation of an incoming, server-side HTTP request.
Interface ilTermsOfServiceDocumentEvaluation.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static http()
Fetches the global http state from ILIAS.
if(empty($password)) $table
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']