25 $ilCtrl->saveParameter($this, array(
"rep_ref_id",
"lang",
"target",
"client_id"));
33 $cmd = $this->ctrl->getCmd(
"processIndexPHP",array(
'processIndexPHP',
'showLogin'));
35 $next_class = $this->ctrl->getNextClass($this);
39 case 'ilpageobjectgui':
43 case "ilaccountregistrationgui":
44 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
48 case "ilpasswordassistancegui":
49 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
65 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
66 $this->ctrl->setCmd(
"");
75 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
76 $this->ctrl->setCmd(
"");
91 $status = $ilAuth->getStatus();
92 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
94 $status =
$_GET[
"auth_stat"];
105 if (empty(
$_GET[
'cookies']))
107 $additional_params =
'';
110 $additional_params .=
'&login_to_purchase_object=1&forceShoppingCartRedirect=1';
114 header(
"Location: login.php?target=".$_GET[
"target"].
"&soap_pw=".$_GET[
"soap_pw"].
"&ext_uid=".$_GET[
"ext_uid"].
"&cookies=nocookies&client_id=".
115 rawurlencode(CLIENT_ID).
"&lang=".$lng->getLangKey().$additional_params);
124 unset(
$_GET[
'cookies']);
128 if (!$ilSetting->get(
"setup_ok"))
130 die(
"Setup is not completed. Please run setup routine again. (Login)");
133 if ($ilSetting->get(
"shib_active") && $ilSetting->get(
"shib_hos_type"))
135 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
140 if (isset($WAYF) && $WAYF->isSelection())
142 if ($WAYF->isValidSelection())
145 $WAYF->setSAMLCookie();
151 elseif ($ilAuth->getAuth())
156 if(!$ilUser->checkTimeLimit())
160 if($ilSetting->get(
'user_reactivate_code'))
171 include_once
'./Services/Tracking/classes/class.ilOnlineTracking.php';
175 include_once
'./Modules/Forum/classes/class.ilObjForum.php';
178 if (
$_GET[
"rep_ref_id"] !=
"")
194 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.login.html",
"Services/Init");
196 #$this->ctrl->setTargetScript("login.php");
197 if(isset(
$_GET[
'forceShoppingCartRedirect']) && (
int)
$_GET[
'forceShoppingCartRedirect'] == 1)
199 $this->ctrl->setParameter($this,
'forceShoppingCartRedirect', 1);
200 $_SESSION[
'forceShoppingCartRedirect'] = 1;
217 $tpl->setVariable(
"PAGETITLE", $lng->txt(
"startpage"));
218 $tpl->setVariable(
"ILIAS_RELEASE", $ilSetting->get(
"ilias_version"));
220 if (isset(
$_GET[
'inactive']) &&
$_GET[
'inactive'])
224 else if (isset(
$_GET[
'expired']) &&
$_GET[
'expired'])
226 $this->
showFailure($lng->txt(
"err_session_expired"));
228 else if (isset(
$_GET[
'login_to_purchase_object']) &&
$_GET[
'login_to_purchase_object'])
230 $lng->loadLanguageModule(
'payment');
231 $this->
showFailure($lng->txt(
"payment_login_to_buy_object"));
232 $_SESSION[
'forceShoppingCartRedirect'] =
'1';
234 else if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
236 $lng->loadLanguageModule(
'registration');
237 if(
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful')
242 elseif(isset(
$_GET[
'reached_session_limit']) &&
$_GET[
'reached_session_limit'])
244 $this->
showFailure($lng->txt(
"reached_session_limit"));
248 $status = $ilAuth->getStatus();
250 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
252 $status =
$_GET[
"auth_stat"];
254 $auth_error = $ilias->getAuthError();
261 $this->
showFailure($lng->txt(
"err_session_expired"));
269 $this->
showFailure($lng->txt(
"err_auth_cas_no_ilias_user"));
273 $this->
showFailure($lng->txt(
"err_auth_soap_no_ilias_user"));
277 $this->
showFailure($lng->txt(
"err_auth_ldap_no_ilias_user"));
281 $this->
showFailure($lng->txt(
"err_auth_radius_no_ilias_user"));
285 $this->
showFailure($lng->txt(
"err_auth_mode_inactive"));
289 $this->
showFailure($lng->txt(
"err_auth_apache_failed"));
295 if (is_object($auth_error))
297 $add =
"<br>".$auth_error->getMessage();
299 $this->
showFailure($lng->txt(
"err_wrong_login").$add);
307 $lng->loadLanguageModule(
"auth");
308 $this->
showSuccess($lng->txt(
"auth_account_code_used"));
311 if (isset(
$_GET[
'time_limit']) &&
$_GET[
'time_limit'])
313 $this->
showFailure($lng->txt(
"time_limit_reached"));
317 if (isset(
$_GET[
'wrong_ip']) &&
$_GET[
'wrong_ip'])
319 $this->
showFailure($lng->txt(
"wrong_ip_detected").
" (".$_SERVER[
"REMOTE_ADDR"].
")");
323 if (isset(
$_GET[
'simultaneous_login']) &&
$_GET[
'simultaneous_login'])
325 $this->
showFailure($lng->txt(
"simultaneous_login_detected"));
328 $this->ctrl->setTargetScript(
"ilias.php");
329 $tpl->setVariable(
"PHP_SELF", $_SERVER[
'PHP_SELF']);
332 if (isset(
$_GET[
'cookies']) &&
$_GET[
'cookies'] ==
'nocookies')
335 $tpl->setVariable(
"COOKIES_HOWTO", $lng->txt(
"cookies_howto"));
336 $tpl->setVariable(
"LINK_NO_COOKIES",
337 $this->ctrl->getLinkTarget($this,
"showNoCookiesScreen"));
341 if(strlen($page_editor_html))
343 $tpl->setVariable(
'LPE',$page_editor_html);
347 $tpl->show(
"DEFAULT",
false);
354 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.login_reactivate_code.html",
"Services/Init");
356 $this->
showFailure($lng->txt(
"time_limit_reached"));
368 $tpl->setVariable(
"FORM", $a_form->getHTML());
369 $tpl->show(
"DEFAULT",
false);
376 $lng->loadLanguageModule(
"auth");
378 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
381 $form->setFormAction($ilCtrl->getFormAction($this,
'showcodeform'));
382 $form->setTitle($lng->txt(
'auth_account_code_title'));
384 $count =
new ilTextInputGUI($lng->txt(
'auth_account_code'),
'code');
386 $count->setInfo($lng->txt(
'auth_account_code_info'));
387 $form->addItem($count);
389 $form->addCommandButton(
'processcode', $lng->txt(
'send'));
399 if($form->checkInput())
401 $code = $form->getInput(
"code");
403 include_once
"Services/User/classes/class.ilAccountCode.php";
414 $invalid_code =
false;
417 if($valid_until ===
"0")
419 $user->setTimeLimitUnlimited(
true);
423 if(is_numeric($valid_until))
425 $valid_until = strtotime(
"+".$valid_until.
"days");
429 $valid_until = explode(
"-", $valid_until);
430 $valid_until = mktime(23, 59, 59, $valid_until[1],
431 $valid_until[2], $valid_until[0]);
432 if($valid_until < time())
434 $invalid_code =
true;
440 $user->setTimeLimitUnlimited(
false);
441 $user->setTimeLimitUntil($valid_until);
447 $user->setActive(
true);
452 $ilCtrl->setParameter($this,
"cu", 1);
453 $ilCtrl->redirect($this,
"showLogin");
457 $lng->loadLanguageModule(
"user");
458 $field = $form->getItemByPostVar(
"code");
459 $field->setAlert($lng->txt(
"user_account_code_not_valid"));
462 $form->setValuesByPost();
482 $ilSetting->get(
"shib_auth_allow_local")) &&
483 $ilSetting->get(
"auth_mode") !=
AUTH_CAS)
485 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
487 $form->setTableWidth(
'500');
488 $form->setFormAction($this->ctrl->getFormAction($this,
''));
489 $form->setName(
"formlogin");
490 $form->setShowTopButtons(
false);
491 $form->setTitle($lng->txt(
"login_to_ilias"));
494 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
498 $visible_auth_methods = array();
502 if(isset($option[
'hide_in_ui']) && $option[
'hide_in_ui'])
508 $radg->addOption($op1);
509 if (isset($option[
'checked']))
511 $radg->setValue($key);
513 $visible_auth_methods[] = $op1;
516 if(count($visible_auth_methods) == 1)
518 $first_auth_method = current($visible_auth_methods);
520 $hidden_auth_method->setValue($first_auth_method->getValue());
521 $form->addItem($hidden_auth_method);
525 $form->addItem($radg);
539 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
540 #$form->addCommandButton("butSubmit", $lng->txt("log_in"));
551 return $page_editor_html;
563 if(strlen($page_editor_html))
566 return $page_editor_html;
569 $loginSettings =
new ilSetting(
"login_settings");
570 $information = $loginSettings->get(
"login_message_".$lng->getLangKey());
572 if(strlen(trim($information)))
574 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
576 return $page_editor_html;
591 if ($ilSetting->get(
"cas_active"))
593 $tpl =
new ilTemplate(
'tpl.login_form_cas.html',
true,
true,
'Services/Init');
594 $tpl->setVariable(
"TXT_CAS_LOGIN", $lng->txt(
"login_to_ilias_via_cas"));
596 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", $ilSetting->get(
"cas_login_instructions"));
597 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
598 $tpl->setVariable(
"TARGET_CAS_LOGIN",$this->ctrl->getLinkTarget($this,
"showLogin"));
599 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
605 '[list-cas-login-form]',
609 return $page_editor_html;
622 if ($ilSetting->get(
"shib_active"))
624 $tpl =
new ilTemplate(
'tpl.login_form_shibboleth.html',
true,
true,
'Services/Init');
626 $tpl->setVariable(
'SHIB_FORMACTION',$this->ctrl->getFormAction($this));
628 if($ilSetting->get(
"shib_hos_type") ==
'external_wayf')
630 $tpl->setCurrentBlock(
"shibboleth_login");
631 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
632 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
633 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
634 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", $ilSetting->get(
"shib_login_button"));
635 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS",
637 $lng->txt(
"shib_general_login_instructions"),
638 $ilSetting->get(
"shib_federation_name")) .
639 ' <a href="mailto:' . $ilSetting->get(
"admin_email") .
'">ILIAS ' . $lng->txt(
"administrator") .
'</a>.'
641 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS",$ilSetting->get(
"shib_login_instructions"));
642 $tpl->parseCurrentBlock();
644 elseif($ilSetting->get(
"shib_hos_type") ==
'embedded_wayf')
646 $tpl->setCurrentBlock(
"cust_shibboleth_login");
647 $customInstructions = stripslashes( $ilSetting->get(
"shib_login_instructions"));
648 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS_B", $customInstructions);
649 $tpl->parseCurrentBlock();
653 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
654 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
655 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
657 "TXT_SELECT_HOME_ORGANIZATION",
658 sprintf($lng->txt(
"shib_select_home_organization"), $ilSetting->get(
"shib_federation_name")));
659 $tpl->setVariable(
"TXT_CONTINUE", $lng->txt(
"btn_next"));
660 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", $lng->txt(
"shib_home_organization"));
661 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS",
662 $lng->txt(
"shib_general_wayf_login_instructions").
663 ' <a href="mailto:'.$ilSetting->get(
"admin_email").
'">ILIAS '. $lng->txt(
"administrator").
'</a>.'
665 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
667 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
670 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
671 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
672 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
673 $tpl->parseCurrentBlock();
680 '[list-shibboleth-login-form]',
685 return $page_editor_html;
700 if(!strlen($page_editor_html))
702 $tpl->setVariable($fallback_tplvar,$element_html);
703 return $page_editor_html;
706 if(!stristr($page_editor_html, $placeholder))
708 $tpl->setVariable($fallback_tplvar,$element_html);
709 return $page_editor_html;
711 return str_replace($placeholder, $element_html, $page_editor_html);
722 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
724 $active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
732 include_once
'./Services/COPage/classes/class.ilPageUtil.php';
738 include_once
'./Services/COPage/classes/class.ilPageObject.php';
739 include_once
'./Services/COPage/classes/class.ilPageObjectGUI.php';
741 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
743 $tpl->setCurrentBlock(
"SyntaxStyle");
745 $tpl->parseCurrentBlock();
755 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
756 $page_gui->setStyleId(0,
'auth');
758 $page_gui->setIntLinkHelpDefault(
"RepositoryItem", $active_lang);
763 $page_gui->setPresentationTitle(
"");
764 $page_gui->setTemplateOutput(
false);
765 $page_gui->setHeader(
"");
766 $page_gui->setEnabledRepositoryObjects(
true);
767 $page_gui->setEnabledLoginPage(
true);
768 $page_gui->setEnabledFileLists(
false);
769 $page_gui->setEnabledPCTabs(
false);
770 $page_gui->setEnabledMaps(
true);
771 $ret = $page_gui->showPage();
784 $languages = $lng->getInstalledLanguages();
785 if(count($languages) <= 1)
790 $ltpl =
new ilTemplate(
'tpl.login_form_lang_selection.html',
true,
true,
'Services/Init');
791 foreach ($languages as $lang_key)
793 $ltpl->setCurrentBlock(
"languages");
794 $ltpl->setVariable(
"LANG_KEY", $lang_key);
795 $ltpl->setVariable(
"LANG_NAME",
797 $ltpl->setVariable(
"BORDER", 0);
798 $ltpl->setVariable(
"VSPACE", 0);
799 $ltpl->parseCurrentBlock();
801 $ltpl->setCurrentBlock(
'lang_selection');
802 $ltpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
803 $ltpl->setVariable(
"LANG_FORM_ACTION",$this->ctrl->getFormAction($this));
804 $ltpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
805 $ltpl->setVariable(
"LANG_ID", $lng->getLangKey());
806 $ltpl->parseCurrentBlock();
812 '[list-language-selection]',
830 $rtpl =
new ilTemplate(
'tpl.login_registration_links.html',
true,
true,
'Services/Init');
833 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
836 $rtpl->setCurrentBlock(
"new_registration");
837 $rtpl->setVariable(
"REGISTER", $lng->txt(
"registration"));
838 $rtpl->setVariable(
"CMD_REGISTER",
839 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
""));
840 $rtpl->parseCurrentBlock();
843 if ($ilSetting->get(
"password_assistance"))
845 $rtpl->setCurrentBlock(
"password_assistance");
846 $rtpl->setVariable(
"FORGOT_PASSWORD", $lng->txt(
"forgot_password"));
847 $rtpl->setVariable(
"FORGOT_USERNAME", $lng->txt(
"forgot_username"));
848 $rtpl->setVariable(
"CMD_FORGOT_PASSWORD",
849 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
""));
850 $rtpl->setVariable(
"CMD_FORGOT_USERNAME",
851 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm"));
852 $rtpl->setVariable(
"LANG_ID", $lng->getLangKey());
853 $rtpl->parseCurrentBlock();
856 if ($ilSetting->get(
"pub_section"))
858 $rtpl->setCurrentBlock(
"homelink");
859 $rtpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".$lng->getLangKey());
860 $rtpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
861 $rtpl->parseCurrentBlock();
864 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
866 $rtpl->setCurrentBlock(
"client_list");
867 $rtpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
868 $rtpl->setVariable(
"CMD_CLIENT_LIST",$this->ctrl->getLinkTarget($this,
"showClientList"));
869 $rtpl->parseCurrentBlock();
876 '[list-registration-link]',
877 'REG_PWD_CLIENT_LINKS'
890 $utpl =
new ilTemplate(
'tpl.login_user_agreement_link.html',
true,
true,
'Services/Init');
891 $utpl->setVariable(
"USER_AGREEMENT", $lng->txt(
"usr_agreement"));
892 $utpl->setVariable(
"LINK_USER_AGREEMENT",$this->ctrl->getLinkTarget($this,
"showUserAgreement"));
898 '[list-user-agreement]',
913 '[list-language-selection] ',
914 '[list-registration-link]',
915 '[list-user-agreement]',
917 '[list-cas-login-form]',
918 '[list-shibboleth-login-form]',
919 '[list-openid-login-form]'
921 array(
'',
'',
'',
'',
'',
'',
''),
931 $tpl->setCurrentBlock(
"warning");
932 $tpl->setVariable(
'TXT_MSG_LOGIN_FAILED', $a_mess);
933 $tpl->setVariable(
"MESSAGE_HEADING", $lng->txt(
"failure_message"));
934 $tpl->setVariable(
"ALT_IMAGE", $lng->txt(
"icon").
" ".$lng->txt(
"failure_message"));
936 $tpl->parseCurrentBlock();
943 $tpl->setCurrentBlock(
'success');
944 $tpl->setVariable(
'TXT_MSG_LOGIN_SUCCESS', $a_mess);
945 $tpl->setVariable(
'MESSAGE_HEADING', $lng->txt(
'success_message'));
946 $tpl->setVariable(
'ALT_IMAGE', $lng->txt(
'icon').
' '.$lng->txt(
'success_message'));
948 $tpl->parseCurrentBlock();
962 $lng->loadLanguageModule(
'auth');
963 $tpl->addBlockFile(
"CONTENT",
965 "tpl.login_account_migration.html",
968 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
970 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
972 $form->setTitle($lng->txt(
'auth_account_migration'));
973 $form->addCommandButton(
'migrateAccount', $lng->txt(
'save'));
974 $form->addCommandButton(
'showLogin', $lng->txt(
'cancel'));
979 $keep =
new ilRadioOption($lng->txt(
'auth_account_migration_keep'),1,$lng->txt(
'auth_info_migrate'));
983 $user->setMaxLength(128);
988 $pass->setRetype(
false);
990 $pass->setMaxLength(128);
991 $keep->addSubItem(
$pass);
992 $rad->addOption($keep);
994 $new =
new ilRadioOption($lng->txt(
'auth_account_migration_new'),2,$lng->txt(
'auth_info_add'));
995 $rad->addOption($new);
997 $form->addItem($rad);
999 $tpl->setVariable(
'MIG_FORM',$form->getHTML());
1001 if(strlen($a_message))
1006 $tpl->show(
'DEFAULT');
1017 global
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
1019 $lng->loadLanguageModule(
'auth');
1021 if(!isset(
$_POST[
'account_migration']))
1027 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
1033 if(
$_POST[
'account_migration'] == 1)
1043 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1044 include_once
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
1048 if(!$ilAuth->checkAuth())
1056 $user->setAuthMode(
$_SESSION[
'tmp_auth_mode']);
1057 $user->setExternalAccount(
$_SESSION[
'tmp_external_account']);
1058 $user->setActive(
true);
1064 foreach(
$_SESSION[
'tmp_roles'] as $role)
1066 $rbacadmin->assignUser((
int) $role,$user->getId());
1071 $ilLog->write(__METHOD__.
': Migrated '.
$_SESSION[
'tmp_external_account'].
' to ILIAS account '.$user->getLogin().
'.');
1073 elseif(
$_POST[
'account_migration'] == 2)
1081 include_once(
'Services/Database/classes/class.ilAuthContainerApache.php');
1083 $container->forceCreation(
true);
1092 include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
1094 $container->forceCreation(
true);
1103 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1104 include_once
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
1107 $container->forceCreation(
true);
1118 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
1119 include_once
'./Services/OpenId/classes/class.ilAuthContainerOpenId.php';
1122 $container->forceCreation(
true);
1125 $ilAuth->callProvider(
$_POST[
'username'], null, null);
1149 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.logout.html",
1152 if ($ilSetting->get(
"pub_section"))
1154 $tpl->setCurrentBlock(
"homelink");
1155 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".$lng->getLangKey());
1156 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
1157 $tpl->parseCurrentBlock();
1160 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
1162 $tpl->setCurrentBlock(
"client_list");
1163 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
1164 $this->ctrl->setParameter($this,
"client_id",
$client_id);
1165 $tpl->setVariable(
"CMD_CLIENT_LIST",
1166 $this->ctrl->getLinkTarget($this,
"showClientList"));
1167 $tpl->parseCurrentBlock();
1168 $this->ctrl->setParameter($this,
"client_id",
"");
1171 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"logout"));
1172 $tpl->setVariable(
"TXT_LOGOUT_TEXT", $lng->txt(
"logout_text"));
1173 $tpl->setVariable(
"TXT_LOGIN", $lng->txt(
"login_to_ilias"));
1174 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".$lng->getLangKey());
1187 $valid = $ilAuth->getValidationData();
1189 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.user_mapping_selection.html",
1199 include_once(
'./Services/User/classes/class.ilObjUser.php');
1200 if (count($email_user) == 1)
1203 $tpl->setCurrentBlock(
"one_user");
1204 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
1205 $tpl->setVariable(
"VAL_USERNAME", current($email_user));
1206 $tpl->setVariable(
"USER_ID", key($email_user));
1207 $tpl->parseCurrentBlock();
1211 foreach($email_user as $key => $login)
1213 $tpl->setCurrentBlock(
"user");
1214 $tpl->setVariable(
"USR_ID", $key);
1215 $tpl->setVariable(
"VAL_USER", $login);
1216 $tpl->parseCurrentBlock();
1218 $tpl->setCurrentBlock(
"multpiple_user");
1219 $tpl->parseCurrentBlock();
1222 $tpl->setCurrentBlock(
"content");
1223 $this->ctrl->setParameter($this,
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
1224 $this->ctrl->setParameter($this,
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
1225 $this->ctrl->setParameter($this,
"auth_stat",
$_GET[
"auth_stat"]);
1226 $tpl->setVariable(
"FORMACTION",
1227 $this->ctrl->getFormAction($this));
1228 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
1229 if (count($email_user) == 1)
1231 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation"));
1232 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_2"));
1236 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation_3"));
1237 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_4"));
1239 $tpl->setVariable(
"TXT_CREATE_USER", $lng->txt(
"ums_create_new_account"));
1240 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
1242 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"login"));
1254 if (!$ilIliasIniFile->readVariable(
"clients",
"list"))
1260 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1263 $tpl->setVariable(
"PAGETITLE",
"Client List");
1264 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./templates/default/delos.css");
1267 $tpl->addBlockfile(
"CONTENT",
"content",
"tpl.client_list.html",
1271 $tpl->addBlockfile(
"CLIENT_LIST",
"client_list",
"tpl.table.html");
1274 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
1277 require_once(
"setup/classes/class.ilClientList.php");
1278 require_once(
"setup/classes/class.ilClient.php");
1279 require_once(
"setup/classes/class.ilDBConnections.php");
1280 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1283 $list = $clientlist->getClients();
1285 if (count($list) == 0)
1287 header(
"Location: ./setup/setup.php");
1291 foreach ($list as $key =>
$client)
1294 $hasPublicSection =
false;
1295 if (
$client->checkDatabaseExists() and
$client->ini->readVariable(
"client",
"access") and
$client->getSetting(
"setup_ok"))
1297 $this->ctrl->setParameter($this,
"client_id", $key);
1300 $tmp[] =
"<a href=\"".
"login.php?cmd=force_login&client_id=".urlencode($key).
"\">Login page</a>";
1302 if(
$client->getSetting(
'pub_section'))
1304 $hasPublicSection =
true;
1305 $tmp[] =
"<a href=\"" .
"repository.php?client_id=" . urlencode($key) .
"\">Start page</a>";
1315 $this->ctrl->setParameter($this,
"client_id",
"");
1321 if($hasPublicSection)
1323 $tbl->setTitle(
"Available Clients");
1324 $tbl->setHeaderNames(array(
"Installation Name",
"Public Access",
"Login"));
1325 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
1326 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
1330 $tbl->setTitle(
"Available Clients");
1331 $tbl->setHeaderNames(array(
"Installation Name",
"Login",
''));
1332 $tbl->setHeaderVars(array(
"name",
"login",
''));
1333 $tbl->setColumnWidth(array(
"70%",
"25%",
'1px'));
1337 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
1338 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1339 $tbl->setLimit(
$_GET[
"limit"]);
1340 $tbl->setOffset(
$_GET[
"offset"]);
1343 $tbl->setData(
$data);
1346 $tbl->setFooter(
"tblfooter");
1349 $tbl->setStyle(
"table",
"std");
1351 $tbl->disable(
"icon");
1352 $tbl->disable(
"numinfo");
1353 $tbl->disable(
"sort");
1357 $tpl->show(
"DEFAULT",
true,
true);
1369 $str =
"<p style=\"margin:15px;\">
1370 You need to enable Session Cookies in your Browser to use ILIAS.
1373 <br/>Tools -> Options -> Privacy -> Cookies
1374 <br/>Enable 'Allow sites to set cookies' and activate option 'Keep
1375 <br/>cookies' auf 'until I close Firefox'
1377 <br/><b>Mozilla/Netscape</b>
1378 <br/>Edit -> Preferences -> Privacy&Security -> Cookies
1379 <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current
1382 <br/><b>Internet Explorer</b>
1383 <br/>Tools -> Internet Options -> Privacy -> Advanced
1384 <br/>- Check 'Override automatic cookie handling'
1385 <br/>- Check 'Always allow session cookies'
1387 $tpl->setVariable(
"CONTENT", $str);
1406 require_once
"./Services/User/classes/class.ilUserAgreement.php";
1408 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.view_usr_agreement.html",
1410 $tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1416 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
1417 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
1422 $lang_opts = array();
1423 foreach ($lng->getInstalledLanguages() as $lang_key)
1430 foreach($lang_opts as $lang_key => $lang_caption)
1432 $tpl->setCurrentBlock(
"languages");
1433 $tpl->setVariable(
"LANG_VAL_CMD", $this->ctrl->getCmd());
1434 $tpl->setVariable(
"AGR_LANG_ACTION",
1435 $this->ctrl->getFormAction($this));
1436 $tpl->setVariable(
"LANG_NAME", $lang_caption);
1437 $tpl->setVariable(
"LANG_ICON", $lang_key);
1438 $tpl->setVariable(
"LANG_KEY", $lang_key);
1439 $tpl->setVariable(
"BORDER", 0);
1440 $tpl->setVariable(
"VSPACE", 0);
1441 $tpl->parseCurrentBlock();
1443 $tpl->setCurrentBlock(
"content");
1446 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"usr_agreement"));
1447 $tpl->setVariable(
"TXT_PAGETITLE",
"ILIAS3 - ".$lng->txt(
"usr_agreement"));
1450 if ($this->ctrl->getCmd() ==
"getAcceptance")
1452 if (
$_POST[
"status"]==
"accepted")
1454 $ilUser->writeAccepted();
1457 $tpl->setVariable(
"VAL_CMD",
"getAcceptance");
1458 $tpl->setVariable(
"AGR_LANG_ACTION",
1459 $this->ctrl->getFormAction($this));
1460 $tpl->setCurrentBlock(
"get_acceptance");
1461 $tpl->setVariable(
"FORM_ACTION",
1462 $this->ctrl->getFormAction($this));
1464 $tpl->setVariable(
"ACCEPT_AGREEMENT", $lng->txt(
"accept_usr_agreement"));
1465 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
1466 $tpl->parseCurrentBlock();
1470 $tpl->setCurrentBlock(
"back");
1471 $tpl->setVariable(
"BACK", $lng->txt(
"back"));
1472 $tpl->setVariable(
"LINK_BACK",
1473 $this->ctrl->getLinkTargetByClass(
"ilstartupgui",
"showLogin"));
1474 $tpl->parseCurrentBlock();
1490 if (!isset(
$_GET[
"client_id"]) &&
1491 $_GET[
"cmd"] ==
"" &&
1492 $ilIliasIniFile->readVariable(
"clients",
"list"))
1502 $start =
"login.php";
1512 if ($ilSetting->get(
"pub_section") &&
$_POST[
"sendLogin"] !=
"1"
1513 && ($ilAuth->getStatus() != -101 &&
$_GET[
"soap_pw"] ==
""))
1518 $_POST[
"username"] =
"anonymous";
1519 $_POST[
"password"] =
"anonymous";
1521 $oldSid = session_id();
1524 if (ANONYMOUS_USER_ID ==
"")
1526 die (
"Public Section enabled, but no Anonymous user found.");
1528 if (!$ilAuth->getAuth())
1530 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
1533 if(IS_PAYMENT_ENABLED)
1535 $newSid = session_id();
1536 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1537 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
1540 $ilInit->initUserAccount();
1562 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID || !empty(
$_GET[
"ref_id"]))
1566 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID &&
$_GET[
"target"] !=
"")
1582 if (empty(
$_GET[
"ref_id"]))
1584 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1586 $ilCtrl->initBaseClass(
"");
1587 $ilCtrl->setCmd(
"frameset");
1588 $start_script =
"repository.php";
1589 include($start_script);
1594 if(IS_PAYMENT_ENABLED)
1598 include_once
'./Services/Payment/classes/class.ilShopLinkBuilder.php';
1601 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1604 if((
int)
$_GET[
'forceShoppingCartRedirect'])
1606 $class =
'ilshopshoppingcartgui';
1607 ilUtil::redirect(
'ilias.php?baseClass=ilShopController&cmd=redirect&redirect_class=ilshopshoppingcartgui');
1611 $tarr = explode(
"_", $_GET[
"target"]);
1624 if (
$_GET[
"target"] !=
"")
1626 $tarr = explode(
"_",
$_GET[
"target"]);
1627 if ($tarr[0] !=
"pg" && $tarr[0] !=
"st" && $tarr[1] > 0)
1635 #$ilCtrl->initBaseClass("ilPersonalDesktopGUI");
1636 #$start_script = "ilias.php";
1647 include($start_script);
1652 global $objDefinition, $ilPluginAdmin;
1654 if (is_object($ilPluginAdmin))
1657 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
1660 foreach ($pl_names as $pl)
1663 $gui_class = $ui_plugin->getUIClassInstance();
1664 $resp = $gui_class->checkGotoHook($a_target);
1665 if ($resp[
"target"] !==
false)
1667 $a_target = $resp[
"target"];
1673 if ($a_target ==
"")
1678 $t_arr = explode(
"_", $a_target);
1686 if ($type ==
"pg" | $type ==
"st")
1691 $class = $objDefinition->getClassName($type);
1696 $location = $objDefinition->getLocation($type);
1697 $full_class =
"ilObj".$class.
"Access";
1698 include_once(
$location.
"/class.".$full_class.
".php");
1700 return call_user_func(array($full_class,
"_checkGoto"),
1710 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
1712 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1717 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1722 $oUser->setActive(
true);
1723 if($oRegSettings->passwordGenerationEnabled())
1726 $password = $passwd[0];
1728 $oUser->setLastPasswordChangeTS( time() );
1732 if($lng->getLangKey() != $oUser->getPref(
'language'))
1734 $lng =
new ilLanguage($oUser->getPref(
'language'));
1739 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
1740 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1742 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1745 $acc_mail->setUser($oUser);
1746 if($oRegSettings->passwordGenerationEnabled())
1748 $acc_mail->setUserPassword($password);
1754 include_once
'Services/Mail/classes/class.ilMail.php';
1755 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
1758 $subject = $lng->txt(
"reg_mail_subject");
1761 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
1762 $lng->txt(
"reg_mail_body_text1").
"\n\n".
1763 $lng->txt(
"reg_mail_body_text2").
"\n".
1764 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";
1765 $body .= $lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
1767 if($oRegSettings->passwordGenerationEnabled())
1769 $body.= $lng->txt(
"passwd").
": ".$password.
"\n";
1773 $body.= $lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
1777 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
1778 $body .= $oUser->getProfileAsString($lng);
1779 $mail_obj->enableSoap(
false);
1780 $mail_obj->appendInstallationSignature(
true);
1781 $mail_obj->sendMail($oUser->getEmail(),
'',
'',
1784 array(), array(
'normal'));
1787 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful');
1791 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
1793 $soap_client->setResponseTimeout(1);
1794 $soap_client->enableWSDL(
true);
1795 $soap_client->init();
1797 $ilLog->write(__METHOD__.
': Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
1801 'deleteExpiredDualOptInUserObjects',
1805 $exception->getCode()
1809 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
1813 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
1825 include_once
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
1828 return $page_editor_html;
1831 $lng->loadLanguageModule(
'auth');
1833 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1835 $form->setTableWidth(
'500');
1836 $form->setShowTopButtons(
false);
1837 $form->setFormAction($this->ctrl->getFormAction($this));
1838 $form->setTitle($lng->txt(
'login_to_ilias_via_openid'));
1840 $openid =
new ilTextInputGUI($lng->txt(
'auth_openid_login'),
'oid_username');
1842 $openid->setMaxLength(255);
1843 $openid->setRequired(
true);
1844 $openid->setCssClass(
'ilOpenIDBox');
1845 $openid->setInfo($lng->txt(
'auth_openid_login_info_a'));
1846 $form->addItem($openid);
1848 include_once
'./Services/OpenId/classes/class.ilOpenIdProviders.php';
1849 $pro =
new ilSelectInputGUI($lng->txt(
'auth_openid_provider'),
'oid_provider');
1852 $form->addItem($pro);
1853 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
1859 '[list-openid-login-form]',