25 $ilCtrl->saveParameter($this, array(
"rep_ref_id",
"lang",
"target",
"client_id"));
33 $cmd = $this->ctrl->getCmd(
"processIndexPHP");
34 $next_class = $this->ctrl->getNextClass($this);
38 case "ilaccountregistrationgui":
39 require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
43 case "ilpasswordassistancegui":
44 require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
59 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
60 $this->ctrl->setCmd(
"");
69 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
70 $this->ctrl->setCmd(
"");
83 $status = $ilAuth->getStatus();
86 $status =
$_GET[
"auth_stat"];
103 if (empty(
$_GET[
'cookies']))
105 $additional_params =
'';
108 $additional_params .=
'&login_to_purchase_object=1&forceShoppingCartRedirect=1';
113 header(
"Location: login.php?target=".
$_GET[
"target"].
"&soap_pw=".
$_GET[
"soap_pw"].
"&ext_uid=".
$_GET[
"ext_uid"].
"&cookies=nocookies&client_id=".rawurlencode(CLIENT_ID).
"&lang=".
$_GET[
'lang'].$additional_params);
122 unset(
$_GET[
'cookies']);
126 if (!$ilSetting->get(
"setup_ok"))
128 die(
"Setup is not completed. Please run setup routine again. (Login)");
131 if ($ilSetting->get(
"shib_active") && $ilSetting->get(
"shib_hos_type"))
133 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
138 if (isset($WAYF) && $WAYF->isSelection())
140 if ($WAYF->isValidSelection())
143 $WAYF->setSAMLCookie();
149 elseif ($ilAuth->getAuth())
154 if(!$ilUser->checkTimeLimit())
163 include_once
'./Services/Tracking/classes/class.ilOnlineTracking.php';
167 if ($ilSetting->get(
"chat_active"))
169 include_once
"./Modules/Chat/classes/class.ilChatServerCommunicator.php";
170 include_once
"./Modules/Chat/classes/class.ilChatRoom.php";
177 include_once
'./Modules/Forum/classes/class.ilObjForum.php';
180 if (
$_GET[
"rep_ref_id"] !=
"")
190 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.login.html",
194 if (
$_GET[
"lang"] ==
"")
196 $_GET[
"lang"] = $ilIliasIniFile->readVariable(
"language",
"default");
202 $tpl->setVariable(
"PAGETITLE", $lng->txt(
"startpage"));
203 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
205 $languages = $lng->getInstalledLanguages();
207 foreach ($languages as $lang_key)
209 $tpl->setCurrentBlock(
"languages");
210 $tpl->setVariable(
"LANG_KEY", $lang_key);
211 $tpl->setVariable(
"LANG_NAME",
213 $tpl->setVariable(
"BORDER", 0);
214 $tpl->setVariable(
"VSPACE", 0);
215 $tpl->parseCurrentBlock();
219 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
222 $tpl->setCurrentBlock(
"new_registration");
223 $tpl->setVariable(
"REGISTER", $lng->txt(
"registration"));
224 $tpl->setVariable(
"CMD_REGISTER",
225 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
""));
226 $tpl->parseCurrentBlock();
229 if ($ilSetting->get(
"password_assistance"))
231 $tpl->setCurrentBlock(
"password_assistance");
232 $tpl->setVariable(
"FORGOT_PASSWORD", $lng->txt(
"forgot_password"));
233 $tpl->setVariable(
"FORGOT_USERNAME", $lng->txt(
"forgot_username"));
234 $tpl->setVariable(
"CMD_FORGOT_PASSWORD",
235 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
""));
236 $tpl->setVariable(
"CMD_FORGOT_USERNAME",
237 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm"));
238 $tpl->setVariable(
"LANG_ID",
$_GET[
"lang"]);
239 $tpl->parseCurrentBlock();
242 if ($ilSetting->get(
"pub_section"))
244 $tpl->setCurrentBlock(
"homelink");
245 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".
$_GET[
"lang"]);
246 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
247 $tpl->parseCurrentBlock();
250 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
252 $tpl->setCurrentBlock(
"client_list");
253 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
254 $tpl->setVariable(
"CMD_CLIENT_LIST",
255 $this->ctrl->getLinkTarget($this,
"showClientList"));
256 $tpl->parseCurrentBlock();
260 if ($ilSetting->get(
"shib_active"))
262 if($ilSetting->get(
"shib_hos_type") !=
'external_wayf'){
263 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
264 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
265 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
266 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf($lng->txt(
"shib_select_home_organization"), $ilSetting->get(
"shib_federation_name")));
267 $tpl->setVariable(
"TXT_CONTINUE", $lng->txt(
"btn_next"));
268 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", $lng->txt(
"shib_home_organization"));
269 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", $lng->txt(
"shib_general_wayf_login_instructions").
' <a href="mailto:'.$ilias->getSetting(
"admin_email").
'">ILIAS '. $lng->txt(
"administrator").
'</a>.');
270 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
271 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
272 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
273 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
275 $tpl->parseCurrentBlock();
277 $tpl->setCurrentBlock(
"shibboleth_login");
278 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
279 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
280 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
281 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", $ilSetting->get(
"shib_login_button"));
282 $tpl->setVariable(
"TXT_SHIB_LOGIN_INSTRUCTIONS", sprintf($lng->txt(
"shib_general_login_instructions"),$ilSetting->get(
"shib_federation_name")).
' <a href="mailto:'.$ilias->getSetting(
"admin_email").
'">ILIAS '. $lng->txt(
"administrator").
'</a>.');
283 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
284 $tpl->parseCurrentBlock();
289 if ($ilSetting->get(
"cas_active"))
291 $tpl->setCurrentBlock(
"cas_login");
292 $tpl->setVariable(
"TXT_CAS_LOGIN", $lng->txt(
"login_to_ilias_via_cas"));
294 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", $ilSetting->get(
"cas_login_instructions"));
295 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
296 $tpl->setVariable(
"TARGET_CAS_LOGIN",
297 $this->ctrl->getLinkTarget($this,
"showLogin"));
298 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
299 $tpl->parseCurrentBlock();
303 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
309 $tpl->setCurrentBlock(
'auth_mode_row');
310 $tpl->setVariable(
'VAL_AUTH_MODE',$key);
311 $tpl->setVariable(
'AUTH_CHECKED',isset($option[
'checked']) ?
'checked=checked' :
'');
312 $tpl->setVariable(
'TXT_AUTH_MODE',$option[
'txt']);
313 $tpl->parseCurrentBlock();
316 $tpl->setCurrentBlock(
'auth_selection');
317 $tpl->setVariable(
'TXT_AUTH_MODE',$lng->txt(
'auth_selection'));
318 $tpl->parseCurrentBlock();
324 $ilSetting->get(
"shib_auth_allow_local")) &&
325 $ilSetting->get(
"auth_mode") !=
AUTH_CAS)
327 $loginSettings =
new ilSetting(
"login_settings");
328 if (
$_GET[
"lang"] ==
false)
330 $information = $loginSettings->get(
"login_message_".$lng->getDefaultLanguage());
334 $information = $loginSettings->get(
"login_message_".
$_GET[
"lang"]);
337 if(strlen(trim($information)))
339 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
342 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
344 $form->setOpenTag(
false);
345 $form->setCloseTag(
false);
346 $form->setTitle($lng->txt(
"login_to_ilias"));
349 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
371 $radg->addOption($op1);
372 if (isset($option[
'checked']))
374 $radg->setValue($key);
378 $form->addItem($radg);
391 $form->addCommandButton(
"butSubmit", $lng->txt(
"log_in"));
392 $tpl->setVariable(
"LOGIN_FORM", $form->getHTML());
394 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
395 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
396 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
398 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
399 $tpl->parseCurrentBlock();
402 $tpl->setVariable(
"ILIAS_RELEASE", $ilSetting->get(
"ilias_version"));
404 if((
int)
$_GET[
'forceShoppingCartRedirect'])
405 $this->ctrl->setParameter($this,
'forceShoppingCartRedirect', 1);
407 $this->ctrl->setTargetScript(
"login.php");
408 $tpl->setVariable(
"FORMACTION",
409 $this->ctrl->getFormAction($this));
411 $tpl->setVariable(
"LANG_FORM_ACTION",
412 $this->ctrl->getFormAction($this));
413 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
414 $tpl->setVariable(
"LANG_ID",
$_GET[
"lang"]);
416 if(
$_GET[
'inactive'])
420 else if(
$_GET[
'expired'])
422 $this->
showFailure($lng->txt(
"err_session_expired"));
424 else if(
$_GET[
'login_to_purchase_object'])
426 $lng->loadLanguageModule(
'payment');
427 $this->
showFailure($lng->txt(
"payment_login_to_buy_object"));
429 else if(isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
431 $lng->loadLanguageModule(
'registration');
432 if(
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful')
439 $status = $ilAuth->getStatus();
444 $status =
$_GET[
"auth_stat"];
446 $auth_error = $ilias->getAuthError();
453 $this->
showFailure($lng->txt(
"err_session_expired"));
461 $this->
showFailure($lng->txt(
"err_auth_cas_no_ilias_user"));
465 $this->
showFailure($lng->txt(
"err_auth_soap_no_ilias_user"));
469 $this->
showFailure($lng->txt(
"err_auth_ldap_no_ilias_user"));
473 $this->
showFailure($lng->txt(
"err_auth_radius_no_ilias_user"));
477 $this->
showFailure($lng->txt(
"err_auth_mode_inactive"));
484 if (is_object($auth_error))
486 $add =
"<br>".$auth_error->getMessage();
488 $this->
showFailure($lng->txt(
"err_wrong_login").$add);
494 if (
$_GET[
'time_limit'])
496 $this->
showFailure($lng->txt(
"time_limit_reached"));
500 if(
$_GET[
'wrong_ip'])
502 $this->
showFailure($lng->txt(
"wrong_ip_detected").
" (".$_SERVER[
"REMOTE_ADDR"].
")");
506 if(
$_GET[
'simultaneous_login'])
508 $this->
showFailure($lng->txt(
"simultaneous_login_detected"));
511 $this->ctrl->setTargetScript(
"ilias.php");
512 $tpl->setVariable(
"PHP_SELF", $_SERVER[
'PHP_SELF']);
513 $tpl->setVariable(
"USER_AGREEMENT", $lng->txt(
"usr_agreement"));
514 $tpl->setVariable(
"LINK_USER_AGREEMENT",
515 $this->ctrl->getLinkTarget($this,
"showUserAgreement"));
518 if (
$_GET[
'cookies'] ==
'nocookies')
521 $tpl->setVariable(
"COOKIES_HOWTO", $lng->txt(
"cookies_howto"));
522 $tpl->setVariable(
"LINK_NO_COOKIES",
523 $this->ctrl->getLinkTarget($this,
"showNoCookiesScreen"));
526 $tpl->show(
"DEFAULT",
false);
533 $tpl->setCurrentBlock(
"warning");
534 $tpl->setVariable(
'TXT_MSG_LOGIN_FAILED', $a_mess);
535 $tpl->setVariable(
"MESSAGE_HEADING", $lng->txt(
"failure_message"));
536 $tpl->setVariable(
"ALT_IMAGE", $lng->txt(
"icon").
" ".$lng->txt(
"failure_message"));
538 $tpl->parseCurrentBlock();
545 $tpl->setCurrentBlock(
'success');
546 $tpl->setVariable(
'TXT_MSG_LOGIN_SUCCESS', $a_mess);
547 $tpl->setVariable(
'MESSAGE_HEADING', $lng->txt(
'success_message'));
548 $tpl->setVariable(
'ALT_IMAGE', $lng->txt(
'icon').
' '.$lng->txt(
'success_message'));
550 $tpl->parseCurrentBlock();
564 $lng->loadLanguageModule(
'auth');
565 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.login_account_migration.html",
567 $tpl->addJavaScript(
'./Services/Authentication/js/account_migration.js');
569 if(strlen($a_message))
573 $tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this,
'migrateAccount'));
574 $tpl->setVariable(
'TXT_ACCOUNT_MIGRATION',$lng->txt(
'auth_account_migration'));
575 $tpl->setVariable(
'INFO_MIGRATE',$lng->txt(
'auth_info_migrate'));
576 $tpl->setVariable(
'INFO_ADD',$lng->txt(
'auth_info_add'));
578 $tpl->setVariable(
'MIG_USER',
$_POST[
'username']);
579 $tpl->setVariable(
'TXT_USER',$lng->txt(
'login'));
580 $tpl->setVariable(
'TXT_PASS',$lng->txt(
'password'));
582 $tpl->setVariable(
'TXT_SUBMIT',$lng->txt(
'save'));
583 $tpl->setVariable(
'TXT_CANCEL',$lng->txt(
'cancel'));
585 $tpl->show(
'DEFAULT');
596 global
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
598 $lng->loadLanguageModule(
'auth');
600 if(!isset(
$_POST[
'account_migration']))
606 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
612 if(
$_POST[
'account_migration'] == 1)
622 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
623 include_once
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
644 $rbacadmin->assignUser((
int) $role,
$user->getId());
649 $ilLog->write(__METHOD__.
': Migrated '.
$_SESSION[
'tmp_external_account'].
' to ILIAS account '.
$user->getLogin().
'.');
659 include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
661 $container->forceCreation(
true);
670 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
671 include_once
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
674 $container->forceCreation(
true);
692 if($ilSetting->get(
"chat_active"))
694 include_once
"./Modules/Chat/classes/class.ilChatServerCommunicator.php";
706 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.logout.html",
709 if ($ilSetting->get(
"pub_section"))
711 $tpl->setCurrentBlock(
"homelink");
712 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
713 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
714 $tpl->parseCurrentBlock();
717 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
719 $tpl->setCurrentBlock(
"client_list");
720 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
721 $this->ctrl->setParameter($this,
"client_id",
$client_id);
722 $tpl->setVariable(
"CMD_CLIENT_LIST",
723 $this->ctrl->getLinkTarget($this,
"showClientList"));
724 $tpl->parseCurrentBlock();
725 $this->ctrl->setParameter($this,
"client_id",
"");
728 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"logout"));
729 $tpl->setVariable(
"TXT_LOGOUT_TEXT", $lng->txt(
"logout_text"));
730 $tpl->setVariable(
"TXT_LOGIN", $lng->txt(
"login_to_ilias"));
731 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
744 $valid = $ilAuth->getValidationData();
746 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.user_mapping_selection.html",
756 include_once(
'./Services/User/classes/class.ilObjUser.php');
757 if (count($email_user) == 1)
760 $tpl->setCurrentBlock(
"one_user");
761 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
762 $tpl->setVariable(
"VAL_USERNAME", current($email_user));
763 $tpl->setVariable(
"USER_ID", key($email_user));
764 $tpl->parseCurrentBlock();
770 $tpl->setCurrentBlock(
"user");
771 $tpl->setVariable(
"USR_ID",
$key);
772 $tpl->setVariable(
"VAL_USER",
$login);
773 $tpl->parseCurrentBlock();
775 $tpl->setCurrentBlock(
"multpiple_user");
776 $tpl->parseCurrentBlock();
779 $tpl->setCurrentBlock(
"content");
780 $this->ctrl->setParameter($this,
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
781 $this->ctrl->setParameter($this,
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
782 $this->ctrl->setParameter($this,
"auth_stat",
$_GET[
"auth_stat"]);
783 $tpl->setVariable(
"FORMACTION",
784 $this->ctrl->getFormAction($this));
785 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
786 if (count($email_user) == 1)
788 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation"));
789 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_2"));
793 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation_3"));
794 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_4"));
796 $tpl->setVariable(
"TXT_CREATE_USER", $lng->txt(
"ums_create_new_account"));
797 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
799 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"login"));
811 if (!$ilIliasIniFile->readVariable(
"clients",
"list"))
817 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
820 $tpl->setVariable(
"PAGETITLE",
"Client List");
821 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./templates/default/delos.css");
824 $tpl->addBlockfile(
"CONTENT",
"content",
"tpl.client_list.html",
828 $tpl->addBlockfile(
"CLIENT_LIST",
"client_list",
"tpl.table.html");
831 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
834 require_once(
"setup/classes/class.ilClientList.php");
835 require_once(
"setup/classes/class.ilClient.php");
836 require_once(
"setup/classes/class.ilDBConnections.php");
837 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
840 $list = $clientlist->getClients();
842 if (count($list) == 0)
844 header(
"Location: ./setup/setup.php");
851 if (
$client->checkDatabaseExists() and
$client->ini->readVariable(
"client",
"access") and
$client->getSetting(
"setup_ok"))
853 $this->ctrl->setParameter($this,
"client_id",
$key);
866 "<a href=\"".
"repository.php?client_id=".urlencode(
$key).
"\">Start page</a>",
867 "<a href=\"".
"login.php?cmd=force_login&client_id=".urlencode(
$key).
"\">Login page</a>"
871 $this->ctrl->setParameter($this,
"client_id",
"");
877 $tbl->setTitle(
"Available Clients");
878 $tbl->setHeaderNames(array(
"Installation Name",
"Public Access",
"Login"));
879 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
880 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
883 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
884 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
885 $tbl->setLimit(
$_GET[
"limit"]);
886 $tbl->setOffset(
$_GET[
"offset"]);
889 $tbl->setData(
$data);
892 $tbl->setFooter(
"tblfooter");
895 $tbl->setStyle(
"table",
"std");
897 $tbl->disable(
"icon");
898 $tbl->disable(
"numinfo");
899 $tbl->disable(
"sort");
903 $tpl->show(
"DEFAULT",
true,
true);
915 $str =
"<p style=\"margin:15px;\">
916 You need to enable Session Cookies in your Browser to use ILIAS.
919 <br/>Tools -> Options -> Privacy -> Cookies
920 <br/>Enable 'Allow sites to set cookies' and activate option 'Keep
921 <br/>cookies' auf 'until I close Firefox'
923 <br/><b>Mozilla/Netscape</b>
924 <br/>Edit -> Preferences -> Privacy&Security -> Cookies
925 <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current
928 <br/><b>Internet Explorer</b>
929 <br/>Tools -> Internet Options -> Privacy -> Advanced
930 <br/>- Check 'Override automatic cookie handling'
931 <br/>- Check 'Always allow session cookies'
933 $tpl->setVariable(
"CONTENT", $str);
952 require_once
"./Services/User/classes/class.ilUserAgreement.php";
954 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.view_usr_agreement.html",
956 $tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
962 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
963 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
966 $languages = $lng->getInstalledLanguages();
968 $count = (int) round(count($languages) / 2);
971 foreach ($languages as $lang_key)
973 $tpl->setCurrentBlock(
"languages");
974 $tpl->setVariable(
"LANG_VAL_CMD", $this->ctrl->getCmd());
975 $tpl->setVariable(
"AGR_LANG_ACTION",
976 $this->ctrl->getFormAction($this));
977 $tpl->setVariable(
"LANG_NAME",
979 $tpl->setVariable(
"LANG_ICON", $lang_key);
980 $tpl->setVariable(
"LANG_KEY", $lang_key);
981 $tpl->setVariable(
"BORDER", 0);
982 $tpl->setVariable(
"VSPACE", 0);
983 $tpl->parseCurrentBlock();
987 $tpl->setCurrentBlock(
"content");
990 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"usr_agreement"));
991 $tpl->setVariable(
"TXT_PAGETITLE",
"ILIAS3 - ".$lng->txt(
"usr_agreement"));
994 if ($this->ctrl->getCmd() ==
"getAcceptance")
996 if (
$_POST[
"status"]==
"accepted")
998 $ilUser->writeAccepted();
1001 $tpl->setVariable(
"VAL_CMD",
"getAcceptance");
1002 $tpl->setVariable(
"AGR_LANG_ACTION",
1003 $this->ctrl->getFormAction($this));
1004 $tpl->setCurrentBlock(
"get_acceptance");
1005 $tpl->setVariable(
"FORM_ACTION",
1006 $this->ctrl->getFormAction($this));
1008 $tpl->setVariable(
"ACCEPT_AGREEMENT", $lng->txt(
"accept_usr_agreement"));
1009 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
1010 $tpl->parseCurrentBlock();
1014 $tpl->setCurrentBlock(
"back");
1015 $tpl->setVariable(
"BACK", $lng->txt(
"back"));
1016 $tpl->setVariable(
"LINK_BACK",
1017 $this->ctrl->getLinkTargetByClass(
"ilstartupgui",
"showLogin"));
1018 $tpl->parseCurrentBlock();
1034 if (!isset(
$_GET[
"client_id"]) &&
1035 $_GET[
"cmd"] ==
"" &&
1036 $ilIliasIniFile->readVariable(
"clients",
"list"))
1077 if ($ilSetting->get(
"pub_section") &&
$_POST[
"sendLogin"] !=
"1"
1078 && ($ilAuth->getStatus() != -101 &&
$_GET[
"soap_pw"] ==
""))
1083 $_POST[
"username"] =
"anonymous";
1084 $_POST[
"password"] =
"anonymous";
1086 if (ANONYMOUS_USER_ID ==
"")
1088 die (
"Public Section enabled, but no Anonymous user found.");
1090 if (!$ilAuth->getAuth())
1092 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
1096 $ilInit->initUserAccount();
1117 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID || !empty(
$_GET[
"ref_id"]))
1121 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID &&
$_GET[
"target"] !=
"")
1137 if (empty(
$_GET[
"ref_id"]))
1139 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1141 $ilCtrl->initBaseClass(
"");
1142 $ilCtrl->setCmd(
"frameset");
1143 $start_script =
"repository.php";
1144 include($start_script);
1151 include_once
'payment/classes/class.ilPaymentShoppingCart.php';
1153 $oCart->setPriceId((
int)$_SESSION[
'price_id']);
1154 $oCart->setPobjectId((
int)$_SESSION[
'pobject_id']);
1157 unset($_SESSION[
'price_id']);
1158 unset($_SESSION[
'pobject_id']);
1160 $lng->loadLanguageModule(
'payment');
1162 ilUtil::redirect(
'ilias.php?baseClass=ilShopController&cmd=redirect&redirect_class=ilshopshoppingcartgui');
1168 if (
$_GET[
"target"] !=
"")
1170 $tarr = explode(
"_",
$_GET[
"target"]);
1171 if ($tarr[0] !=
"pg" && $tarr[0] !=
"st" && $tarr[1] > 0)
1179 #$ilCtrl->initBaseClass("ilPersonalDesktopGUI");
1180 #$start_script = "ilias.php";
1191 include($start_script);
1196 global $objDefinition;
1198 if ($a_target ==
"")
1203 $t_arr = explode(
"_",
$_GET[
"target"]);
1216 $class = $objDefinition->getClassName(
$type);
1222 $full_class =
"ilObj".$class.
"Access";
1223 include_once(
$location.
"/class.".$full_class.
".php");
1225 return call_user_func(array($full_class,
"_checkGoto"),
1233 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
1235 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1240 global
$lng, $ilias;
1242 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1247 $oUser->setActive(
true);
1248 if($oRegSettings->passwordGenerationEnabled())
1253 $oUser->setLastPasswordChangeTS( time() );
1257 if($lng->getLangKey() != $oUser->getPref(
'language'))
1259 $lng =
new ilLanguage($oUser->getPref(
'language'));
1264 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
1265 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1267 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1270 $acc_mail->setUser($oUser);
1271 if($oRegSettings->passwordGenerationEnabled())
1279 include_once
'Services/Mail/classes/class.ilMail.php';
1280 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
1283 $subject = $lng->txt(
"reg_mail_subject");
1286 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
1287 $lng->txt(
"reg_mail_body_text1").
"\n\n".
1288 $lng->txt(
"reg_mail_body_text2").
"\n".
1289 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";
1290 $body .= $lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
1292 if($oRegSettings->passwordGenerationEnabled())
1294 $body.= $lng->txt(
"passwd").
": ".
$password.
"\n";
1298 $body.= $lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
1302 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
1303 $body .= $oUser->getProfileAsString($lng);
1304 $mail_obj->enableSoap(
false);
1305 $mail_obj->appendInstallationSignature(
true);
1306 $mail_obj->sendMail($oUser->getEmail(),
'',
'',
1309 array(), array(
'normal'));
1312 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful');
1316 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$oException->getMessage());
1320 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$oException->getMessage());