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");
60 $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
61 $this->ctrl->setCmd(
"");
70 $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
71 $this->ctrl->setCmd(
"");
84 $status = $ilAuth->getStatus();
85 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
87 $status =
$_GET[
"auth_stat"];
104 if (empty(
$_GET[
'cookies']))
106 $additional_params =
'';
109 $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=".rawurlencode(CLIENT_ID).
"&lang=".$_GET[
'lang'].$additional_params);
123 unset(
$_GET[
'cookies']);
127 if (!$ilSetting->get(
"setup_ok"))
129 die(
"Setup is not completed. Please run setup routine again. (Login)");
132 if ($ilSetting->get(
"shib_active") && $ilSetting->get(
"shib_hos_type"))
134 require_once
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
139 if (isset($WAYF) && $WAYF->isSelection())
141 if ($WAYF->isValidSelection())
144 $WAYF->setSAMLCookie();
150 elseif ($ilAuth->getAuth())
155 if(!$ilUser->checkTimeLimit())
164 include_once
'./Services/Tracking/classes/class.ilOnlineTracking.php';
167 if (
$_GET[
"rep_ref_id"] !=
"")
177 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.login.html",
181 if (
$_GET[
"lang"] ==
"")
183 $_GET[
"lang"] = $ilIliasIniFile->readVariable(
"language",
"default");
189 $tpl->setVariable(
"PAGETITLE", $lng->txt(
"startpage"));
190 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
192 $languages = $lng->getInstalledLanguages();
194 foreach ($languages as $lang_key)
196 $tpl->setCurrentBlock(
"languages");
197 $tpl->setVariable(
"LANG_KEY", $lang_key);
198 $tpl->setVariable(
"LANG_NAME",
200 $tpl->setVariable(
"BORDER", 0);
201 $tpl->setVariable(
"VSPACE", 0);
202 $tpl->parseCurrentBlock();
206 include_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
209 $tpl->setCurrentBlock(
"new_registration");
210 $tpl->setVariable(
"REGISTER", $lng->txt(
"registration"));
211 $tpl->setVariable(
"CMD_REGISTER",
212 $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui",
""));
213 $tpl->parseCurrentBlock();
216 if ($ilSetting->get(
"password_assistance"))
218 $tpl->setCurrentBlock(
"password_assistance");
219 $tpl->setVariable(
"FORGOT_PASSWORD", $lng->txt(
"forgot_password"));
220 $tpl->setVariable(
"FORGOT_USERNAME", $lng->txt(
"forgot_username"));
221 $tpl->setVariable(
"CMD_FORGOT_PASSWORD",
222 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
""));
223 $tpl->setVariable(
"CMD_FORGOT_USERNAME",
224 $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui",
"showUsernameAssistanceForm"));
225 $tpl->setVariable(
"LANG_ID",
$_GET[
"lang"]);
226 $tpl->parseCurrentBlock();
229 if ($ilSetting->get(
"pub_section"))
231 $tpl->setCurrentBlock(
"homelink");
232 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$_COOKIE[
"ilClientId"].
"&lang=".
$_GET[
"lang"]);
233 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
234 $tpl->parseCurrentBlock();
237 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
239 $tpl->setCurrentBlock(
"client_list");
240 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
241 $tpl->setVariable(
"CMD_CLIENT_LIST",
242 $this->ctrl->getLinkTarget($this,
"showClientList"));
243 $tpl->parseCurrentBlock();
247 if ($ilSetting->get(
"shib_active"))
250 if($ilSetting->get(
"shib_hos_type") ==
'external_wayf'){
251 $tpl->setCurrentBlock(
"shibboleth_login");
252 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
253 $tpl->setVariable(
"IL_TARGET",
$_GET[
"target"]);
254 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
255 $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", $ilSetting->get(
"shib_login_button"));
256 $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>.');
257 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
258 $tpl->parseCurrentBlock();
259 } elseif($ilSetting->get(
"shib_hos_type") ==
'embedded_wayf') {
260 $tpl->setCurrentBlock(
"shibboleth_custom_login");
261 $customInstructions = stripslashes( $ilSetting->get(
"shib_login_instructions"));
262 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
263 $tpl->parseCurrentBlock();
265 $tpl->setCurrentBlock(
"shibboleth_wayf_login");
266 $tpl->setVariable(
"TXT_SHIB_LOGIN", $lng->txt(
"login_to_ilias_via_shibboleth"));
267 $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", $ilSetting->get(
"shib_federation_name"));
268 $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", sprintf($lng->txt(
"shib_select_home_organization"), $ilSetting->get(
"shib_federation_name")));
269 $tpl->setVariable(
"TXT_CONTINUE", $lng->txt(
"btn_next"));
270 $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", $lng->txt(
"shib_home_organization"));
271 $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>.');
272 $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $ilSetting->get(
"shib_login_instructions"));
273 $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
274 $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
275 $tpl->setVariable(
"ILW_TARGET",
$_GET[
"target"]);
276 $tpl->parseCurrentBlock();
281 if ($ilSetting->get(
"cas_active"))
283 $tpl->setCurrentBlock(
"cas_login");
284 $tpl->setVariable(
"TXT_CAS_LOGIN", $lng->txt(
"login_to_ilias_via_cas"));
286 $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", $ilSetting->get(
"cas_login_instructions"));
287 $this->ctrl->setParameter($this,
"forceCASLogin",
"1");
288 $tpl->setVariable(
"TARGET_CAS_LOGIN",
289 $this->ctrl->getLinkTarget($this,
"showLogin"));
290 $this->ctrl->setParameter($this,
"forceCASLogin",
"");
291 $tpl->parseCurrentBlock();
298 $ilSetting->get(
"shib_auth_allow_local")) &&
299 $ilSetting->get(
"auth_mode") !=
AUTH_CAS)
301 $loginSettings =
new ilSetting(
"login_settings");
302 if (
$_GET[
"lang"] ==
false)
304 $information = $loginSettings->get(
"login_message_".$lng->getDefaultLanguage());
308 $information = $loginSettings->get(
"login_message_".
$_GET[
"lang"]);
311 if(strlen(trim($information)))
313 $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
316 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
318 $form->setOpenTag(
false);
319 $form->setCloseTag(
false);
320 $form->setTitle($lng->txt(
"login_to_ilias"));
323 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
331 $radg->addOption($op1);
332 if (isset($option[
'checked']))
334 $radg->setValue($key);
338 $form->addItem($radg);
351 $form->addCommandButton(
"butSubmit", $lng->txt(
"log_in"));
352 $tpl->setVariable(
"LOGIN_FORM", $form->getHTML());
354 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
355 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
356 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
357 if (isset(
$_POST[
"username"]))
361 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
362 $tpl->parseCurrentBlock();
368 $tpl->setVariable(
"ILIAS_RELEASE", $ilSetting->get(
"ilias_version"));
370 if (isset(
$_GET[
'forceShoppingCartRedirect']))
372 $this->ctrl->setParameter($this,
'forceShoppingCartRedirect', 1);
375 $this->ctrl->setTargetScript(
"login.php");
376 $tpl->setVariable(
"FORMACTION",
377 $this->ctrl->getFormAction($this));
379 $tpl->setVariable(
"LANG_FORM_ACTION",
380 $this->ctrl->getFormAction($this));
381 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
382 $tpl->setVariable(
"LANG_ID",
$_GET[
"lang"]);
384 if (isset(
$_GET[
'inactive']) &&
$_GET[
'inactive'])
388 else if (isset(
$_GET[
'expired']) &&
$_GET[
'expired'])
390 $this->
showFailure($lng->txt(
"err_session_expired"));
392 else if (isset(
$_GET[
'login_to_purchase_object']) &&
$_GET[
'login_to_purchase_object'])
394 $lng->loadLanguageModule(
'payment');
395 $this->
showFailure($lng->txt(
"payment_login_to_buy_object"));
397 else if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg'])))
399 $lng->loadLanguageModule(
'registration');
400 if(
$_GET[
'reg_confirmation_msg'] ==
'reg_account_confirmation_successful')
405 elseif(isset(
$_GET[
'reached_session_limit']) &&
$_GET[
'reached_session_limit'])
407 $this->
showFailure($lng->txt(
"reached_session_limit"));
411 $status = $ilAuth->getStatus();
413 if ($status ==
"" && isset(
$_GET[
"auth_stat"]))
415 $status =
$_GET[
"auth_stat"];
417 $auth_error = $ilias->getAuthError();
424 $this->
showFailure($lng->txt(
"err_session_expired"));
432 $this->
showFailure($lng->txt(
"err_auth_cas_no_ilias_user"));
436 $this->
showFailure($lng->txt(
"err_auth_soap_no_ilias_user"));
440 $this->
showFailure($lng->txt(
"err_auth_ldap_no_ilias_user"));
444 $this->
showFailure($lng->txt(
"err_auth_radius_no_ilias_user"));
448 $this->
showFailure($lng->txt(
"err_auth_mode_inactive"));
452 $this->
showFailure($lng->txt(
"err_auth_apache_failed"));
458 if (is_object($auth_error))
460 $add =
"<br>".$auth_error->getMessage();
462 $this->
showFailure($lng->txt(
"err_wrong_login").$add);
468 if (isset(
$_GET[
'time_limit']) &&
$_GET[
'time_limit'])
470 $this->
showFailure($lng->txt(
"time_limit_reached"));
474 if (isset(
$_GET[
'wrong_ip']) &&
$_GET[
'wrong_ip'])
476 $this->
showFailure($lng->txt(
"wrong_ip_detected").
" (".$_SERVER[
"REMOTE_ADDR"].
")");
480 if (isset(
$_GET[
'simultaneous_login']) &&
$_GET[
'simultaneous_login'])
482 $this->
showFailure($lng->txt(
"simultaneous_login_detected"));
485 $this->ctrl->setTargetScript(
"ilias.php");
486 $tpl->setVariable(
"PHP_SELF", $_SERVER[
'PHP_SELF']);
487 $tpl->setVariable(
"USER_AGREEMENT", $lng->txt(
"usr_agreement"));
488 $tpl->setVariable(
"LINK_USER_AGREEMENT",
489 $this->ctrl->getLinkTarget($this,
"showUserAgreement"));
492 if (isset(
$_GET[
'cookies']) &&
$_GET[
'cookies'] ==
'nocookies')
495 $tpl->setVariable(
"COOKIES_HOWTO", $lng->txt(
"cookies_howto"));
496 $tpl->setVariable(
"LINK_NO_COOKIES",
497 $this->ctrl->getLinkTarget($this,
"showNoCookiesScreen"));
500 $tpl->show(
"DEFAULT",
false);
507 $tpl->setCurrentBlock(
"warning");
508 $tpl->setVariable(
'TXT_MSG_LOGIN_FAILED', $a_mess);
509 $tpl->setVariable(
"MESSAGE_HEADING", $lng->txt(
"failure_message"));
510 $tpl->setVariable(
"ALT_IMAGE", $lng->txt(
"icon").
" ".$lng->txt(
"failure_message"));
512 $tpl->parseCurrentBlock();
519 $tpl->setCurrentBlock(
'success');
520 $tpl->setVariable(
'TXT_MSG_LOGIN_SUCCESS', $a_mess);
521 $tpl->setVariable(
'MESSAGE_HEADING', $lng->txt(
'success_message'));
522 $tpl->setVariable(
'ALT_IMAGE', $lng->txt(
'icon').
' '.$lng->txt(
'success_message'));
524 $tpl->parseCurrentBlock();
538 $lng->loadLanguageModule(
'auth');
539 $tpl->addBlockFile(
"CONTENT",
541 "tpl.login_account_migration.html",
544 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
546 $form->setFormAction($this->ctrl->getFormAction($this,
'migrateAccount'));
548 $form->setTitle($lng->txt(
'auth_account_migration'));
549 $form->addCommandButton(
'migrateAccount', $lng->txt(
'save'));
550 $form->addCommandButton(
'showLogin', $lng->txt(
'cancel'));
555 $keep =
new ilRadioOption($lng->txt(
'auth_account_migration_keep'),1,$lng->txt(
'auth_info_migrate'));
559 $user->setMaxLength(128);
564 $pass->setRetype(
false);
566 $pass->setMaxLength(128);
567 $keep->addSubItem(
$pass);
568 $rad->addOption($keep);
570 $new =
new ilRadioOption($lng->txt(
'auth_account_migration_new'),2,$lng->txt(
'auth_info_add'));
571 $rad->addOption($new);
573 $form->addItem($rad);
575 $tpl->setVariable(
'MIG_FORM',$form->getHTML());
577 if(strlen($a_message))
582 $tpl->show(
'DEFAULT');
593 global
$lng,$ilClientIniFile,
$ilLog,$rbacadmin;
595 $lng->loadLanguageModule(
'auth');
597 if(!isset(
$_POST[
'account_migration']))
603 if(
$_POST[
'account_migration'] == 1 and (!strlen(
$_POST[
'mig_username']) or !strlen(
$_POST[
'mig_password'])))
609 if(
$_POST[
'account_migration'] == 1)
619 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
620 include_once
'./Services/Database/classes/class.ilAuthContainerMDB2.php';
624 if(!$ilAuth->checkAuth())
632 $user->setAuthMode(
$_SESSION[
'tmp_auth_mode']);
633 $user->setExternalAccount(
$_SESSION[
'tmp_external_account']);
641 $rbacadmin->assignUser((
int) $role,$user->getId());
646 $ilLog->write(__METHOD__.
': Migrated '.
$_SESSION[
'tmp_external_account'].
' to ILIAS account '.$user->getLogin().
'.');
648 elseif(
$_POST[
'account_migration'] == 2)
656 include_once(
'Services/Database/classes/class.ilAuthContainerApache.php');
658 $container->forceCreation(
true);
667 include_once(
'Services/LDAP/classes/class.ilAuthContainerLDAP.php');
669 $container->forceCreation(
true);
678 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
679 include_once
'./Services/Radius/classes/class.ilAuthContainerRadius.php';
682 $container->forceCreation(
true);
693 include_once
'./Services/Authentication/classes/class.ilAuthFactory.php';
694 include_once
'./Services/OpenId/classes/class.ilAuthContainerOpenId.php';
697 $container->forceCreation(
true);
700 $ilAuth->callProvider(
$_POST[
'username'], null, null);
724 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.logout.html",
727 if ($ilSetting->get(
"pub_section"))
729 $tpl->setCurrentBlock(
"homelink");
730 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
731 $tpl->setVariable(
"TXT_HOME",$lng->txt(
"home"));
732 $tpl->parseCurrentBlock();
735 if ($ilIliasIniFile->readVariable(
"clients",
"list"))
737 $tpl->setCurrentBlock(
"client_list");
738 $tpl->setVariable(
"TXT_CLIENT_LIST", $lng->txt(
"to_client_list"));
739 $this->ctrl->setParameter($this,
"client_id",
$client_id);
740 $tpl->setVariable(
"CMD_CLIENT_LIST",
741 $this->ctrl->getLinkTarget($this,
"showClientList"));
742 $tpl->parseCurrentBlock();
743 $this->ctrl->setParameter($this,
"client_id",
"");
746 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"logout"));
747 $tpl->setVariable(
"TXT_LOGOUT_TEXT", $lng->txt(
"logout_text"));
748 $tpl->setVariable(
"TXT_LOGIN", $lng->txt(
"login_to_ilias"));
749 $tpl->setVariable(
"CLIENT_ID",
"?client_id=".
$client_id.
"&lang=".
$_GET[
'lang']);
762 $valid = $ilAuth->getValidationData();
764 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.user_mapping_selection.html",
774 include_once(
'./Services/User/classes/class.ilObjUser.php');
775 if (count($email_user) == 1)
778 $tpl->setCurrentBlock(
"one_user");
779 $tpl->setVariable(
"TXT_USERNAME", $lng->txt(
"username"));
780 $tpl->setVariable(
"VAL_USERNAME", current($email_user));
781 $tpl->setVariable(
"USER_ID", key($email_user));
782 $tpl->parseCurrentBlock();
786 foreach($email_user as $key => $login)
788 $tpl->setCurrentBlock(
"user");
789 $tpl->setVariable(
"USR_ID", $key);
790 $tpl->setVariable(
"VAL_USER", $login);
791 $tpl->parseCurrentBlock();
793 $tpl->setCurrentBlock(
"multpiple_user");
794 $tpl->parseCurrentBlock();
797 $tpl->setCurrentBlock(
"content");
798 $this->ctrl->setParameter($this,
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
799 $this->ctrl->setParameter($this,
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
800 $this->ctrl->setParameter($this,
"auth_stat",
$_GET[
"auth_stat"]);
801 $tpl->setVariable(
"FORMACTION",
802 $this->ctrl->getFormAction($this));
803 $tpl->setVariable(
"TXT_ILIAS_LOGIN", $lng->txt(
"login_to_ilias"));
804 if (count($email_user) == 1)
806 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation"));
807 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_2"));
811 $tpl->setVariable(
"TXT_EXPLANATION", $lng->txt(
"ums_explanation_3"));
812 $tpl->setVariable(
"TXT_EXPLANATION_2", $lng->txt(
"ums_explanation_4"));
814 $tpl->setVariable(
"TXT_CREATE_USER", $lng->txt(
"ums_create_new_account"));
815 $tpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
817 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"login"));
829 if (!$ilIliasIniFile->readVariable(
"clients",
"list"))
835 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
838 $tpl->setVariable(
"PAGETITLE",
"Client List");
839 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./templates/default/delos.css");
842 $tpl->addBlockfile(
"CONTENT",
"content",
"tpl.client_list.html",
846 $tpl->addBlockfile(
"CLIENT_LIST",
"client_list",
"tpl.table.html");
849 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
852 require_once(
"setup/classes/class.ilClientList.php");
853 require_once(
"setup/classes/class.ilClient.php");
854 require_once(
"setup/classes/class.ilDBConnections.php");
855 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
858 $list = $clientlist->getClients();
860 if (count($list) == 0)
862 header(
"Location: ./setup/setup.php");
866 foreach ($list as $key =>
$client)
869 if (
$client->checkDatabaseExists() and
$client->ini->readVariable(
"client",
"access") and
$client->getSetting(
"setup_ok"))
871 $this->ctrl->setParameter($this,
"client_id", $key);
884 "<a href=\"".
"repository.php?client_id=".urlencode($key).
"\">Start page</a>",
885 "<a href=\"".
"login.php?cmd=force_login&client_id=".urlencode($key).
"\">Login page</a>"
889 $this->ctrl->setParameter($this,
"client_id",
"");
895 $tbl->setTitle(
"Available Clients");
896 $tbl->setHeaderNames(array(
"Installation Name",
"Public Access",
"Login"));
897 $tbl->setHeaderVars(array(
"name",
"index",
"login"));
898 $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
901 $tbl->setOrderColumn(
$_GET[
"sort_by"],
"name");
902 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
903 $tbl->setLimit(
$_GET[
"limit"]);
904 $tbl->setOffset(
$_GET[
"offset"]);
907 $tbl->setData(
$data);
910 $tbl->setFooter(
"tblfooter");
913 $tbl->setStyle(
"table",
"std");
915 $tbl->disable(
"icon");
916 $tbl->disable(
"numinfo");
917 $tbl->disable(
"sort");
921 $tpl->show(
"DEFAULT",
true,
true);
933 $str =
"<p style=\"margin:15px;\">
934 You need to enable Session Cookies in your Browser to use ILIAS.
937 <br/>Tools -> Options -> Privacy -> Cookies
938 <br/>Enable 'Allow sites to set cookies' and activate option 'Keep
939 <br/>cookies' auf 'until I close Firefox'
941 <br/><b>Mozilla/Netscape</b>
942 <br/>Edit -> Preferences -> Privacy&Security -> Cookies
943 <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current
946 <br/><b>Internet Explorer</b>
947 <br/>Tools -> Internet Options -> Privacy -> Advanced
948 <br/>- Check 'Override automatic cookie handling'
949 <br/>- Check 'Always allow session cookies'
951 $tpl->setVariable(
"CONTENT", $str);
970 require_once
"./Services/User/classes/class.ilUserAgreement.php";
972 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.view_usr_agreement.html",
974 $tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
980 $tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $lng->txt(
"choose_language"));
981 $tpl->setVariable(
"TXT_OK", $lng->txt(
"ok"));
984 $languages = $lng->getInstalledLanguages();
986 $count = (int) round(count($languages) / 2);
989 foreach ($languages as $lang_key)
991 $tpl->setCurrentBlock(
"languages");
992 $tpl->setVariable(
"LANG_VAL_CMD", $this->ctrl->getCmd());
993 $tpl->setVariable(
"AGR_LANG_ACTION",
994 $this->ctrl->getFormAction($this));
995 $tpl->setVariable(
"LANG_NAME",
997 $tpl->setVariable(
"LANG_ICON", $lang_key);
998 $tpl->setVariable(
"LANG_KEY", $lang_key);
999 $tpl->setVariable(
"BORDER", 0);
1000 $tpl->setVariable(
"VSPACE", 0);
1001 $tpl->parseCurrentBlock();
1005 $tpl->setCurrentBlock(
"content");
1008 $tpl->setVariable(
"TXT_PAGEHEADLINE", $lng->txt(
"usr_agreement"));
1009 $tpl->setVariable(
"TXT_PAGETITLE",
"ILIAS3 - ".$lng->txt(
"usr_agreement"));
1012 if ($this->ctrl->getCmd() ==
"getAcceptance")
1014 if (
$_POST[
"status"]==
"accepted")
1016 $ilUser->writeAccepted();
1019 $tpl->setVariable(
"VAL_CMD",
"getAcceptance");
1020 $tpl->setVariable(
"AGR_LANG_ACTION",
1021 $this->ctrl->getFormAction($this));
1022 $tpl->setCurrentBlock(
"get_acceptance");
1023 $tpl->setVariable(
"FORM_ACTION",
1024 $this->ctrl->getFormAction($this));
1026 $tpl->setVariable(
"ACCEPT_AGREEMENT", $lng->txt(
"accept_usr_agreement"));
1027 $tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"submit"));
1028 $tpl->parseCurrentBlock();
1032 $tpl->setCurrentBlock(
"back");
1033 $tpl->setVariable(
"BACK", $lng->txt(
"back"));
1034 $tpl->setVariable(
"LINK_BACK",
1035 $this->ctrl->getLinkTargetByClass(
"ilstartupgui",
"showLogin"));
1036 $tpl->parseCurrentBlock();
1052 if (!isset(
$_GET[
"client_id"]) &&
1053 $_GET[
"cmd"] ==
"" &&
1054 $ilIliasIniFile->readVariable(
"clients",
"list"))
1086 $start =
"login.php";
1096 if ($ilSetting->get(
"pub_section") &&
$_POST[
"sendLogin"] !=
"1"
1097 && ($ilAuth->getStatus() != -101 &&
$_GET[
"soap_pw"] ==
""))
1102 $_POST[
"username"] =
"anonymous";
1103 $_POST[
"password"] =
"anonymous";
1105 $oldSid = session_id();
1108 if (ANONYMOUS_USER_ID ==
"")
1110 die (
"Public Section enabled, but no Anonymous user found.");
1112 if (!$ilAuth->getAuth())
1114 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
1117 $newSid = session_id();
1118 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1119 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
1122 $ilInit->initUserAccount();
1144 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID || !empty(
$_GET[
"ref_id"]))
1148 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID &&
$_GET[
"target"] !=
"")
1164 if (empty(
$_GET[
"ref_id"]))
1166 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1168 $ilCtrl->initBaseClass(
"");
1169 $ilCtrl->setCmd(
"frameset");
1170 $start_script =
"repository.php";
1171 include($start_script);
1176 if(IS_PAYMENT_ENABLED)
1179 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1186 if (
$_GET[
"target"] !=
"")
1188 $tarr = explode(
"_",
$_GET[
"target"]);
1189 if ($tarr[0] !=
"pg" && $tarr[0] !=
"st" && $tarr[1] > 0)
1197 #$ilCtrl->initBaseClass("ilPersonalDesktopGUI");
1198 #$start_script = "ilias.php";
1209 include($start_script);
1214 global $objDefinition;
1216 if ($a_target ==
"")
1221 $t_arr = explode(
"_",
$_GET[
"target"]);
1234 $class = $objDefinition->getClassName(
$type);
1240 $full_class =
"ilObj".$class.
"Access";
1241 include_once(
$location.
"/class.".$full_class.
".php");
1243 return call_user_func(array($full_class,
"_checkGoto"),
1253 if(!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh'])))
1255 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
1260 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
1265 $oUser->setActive(
true);
1266 if($oRegSettings->passwordGenerationEnabled())
1269 $password = $passwd[0];
1271 $oUser->setLastPasswordChangeTS( time() );
1275 if($lng->getLangKey() != $oUser->getPref(
'language'))
1277 $lng =
new ilLanguage($oUser->getPref(
'language'));
1282 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
1283 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1285 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1288 $acc_mail->setUser($oUser);
1289 if($oRegSettings->passwordGenerationEnabled())
1291 $acc_mail->setUserPassword($password);
1297 include_once
'Services/Mail/classes/class.ilMail.php';
1298 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
1301 $subject = $lng->txt(
"reg_mail_subject");
1304 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$oUser->getFullname().
",\n\n".
1305 $lng->txt(
"reg_mail_body_text1").
"\n\n".
1306 $lng->txt(
"reg_mail_body_text2").
"\n".
1307 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID.
"\n";
1308 $body .= $lng->txt(
"login").
": ".$oUser->getLogin().
"\n";
1310 if($oRegSettings->passwordGenerationEnabled())
1312 $body.= $lng->txt(
"passwd").
": ".$password.
"\n";
1316 $body.= $lng->txt(
'reg_mail_body_forgot_password_info').
"\n";
1320 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
1321 $body .= $oUser->getProfileAsString($lng);
1322 $mail_obj->enableSoap(
false);
1323 $mail_obj->appendInstallationSignature(
true);
1324 $mail_obj->sendMail($oUser->getEmail(),
'',
'',
1327 array(), array(
'normal'));
1330 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful');
1334 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
1336 $soap_client->setTimeout(1);
1337 $soap_client->setResponseTimeout(1);
1338 $soap_client->enableWSDL(
true);
1339 $soap_client->init();
1341 $ilLog->write(__METHOD__.
': Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
1345 'deleteExpiredDualOptInUserObjects',
1349 $exception->getCode()
1353 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
1357 ilUtil::redirect(
'./login.php?cmd=force_login®_confirmation_msg='.$exception->getMessage());
1369 include_once
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
1375 $lng->loadLanguageModule(
'auth');
1377 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1379 $form->setFormAction($this->ctrl->getFormAction($this,
'login'));
1380 $form->setTitle($lng->txt(
'login_to_ilias_via_openid'));
1382 $openid =
new ilTextInputGUI($lng->txt(
'auth_openid_login'),
'oid_username');
1384 $openid->setMaxLength(255);
1385 $openid->setRequired(
true);
1386 $openid->setCssClass(
'ilOpenIDBox');
1387 $openid->setInfo($lng->txt(
'auth_openid_login_info_a'));
1388 $form->addItem($openid);
1390 include_once
'./Services/OpenId/classes/class.ilOpenIdProviders.php';
1391 $pro =
new ilSelectInputGUI($lng->txt(
'auth_openid_provider'),
'oid_provider');
1394 $form->addItem($pro);
1397 $form->addCommandButton(
"showLogin", $lng->txt(
"log_in"));
1399 $tpl->setVariable(
'OID_LOGIN_FORM',$form->getHTML());