4require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
 
   34        $this->lng->loadLanguageModule(
'auth');
 
   37        $ilCtrl->saveParameter($this, array(
"rep_ref_id", 
"lang", 
"target", 
"client_id"));
 
   46        $cmd = $this->ctrl->getCmd(
"processIndexPHP", array(
'processIndexPHP',
'showLoginPage'));
 
   47        $next_class = $this->ctrl->getNextClass($this);
 
   49        switch ($next_class) {
 
   50            case 'ilLoginPageGUI':
 
   53            case "ilaccountregistrationgui":
 
   54                require_once(
"Services/Registration/classes/class.ilAccountRegistrationGUI.php");
 
   57            case "ilpasswordassistancegui":
 
   58                require_once(
"Services/Init/classes/class.ilPasswordAssistanceGUI.php");
 
   81        $this->ctrl->setCmdClass(
"ilaccountregistrationgui");
 
   82        $this->ctrl->setCmd(
"");
 
   92        $this->ctrl->setCmdClass(
"ilpasswordassistancegui");
 
   93        $this->ctrl->setCmd(
"");
 
  100    protected function showLoginPageOrStartupPage()
 
  105        $auth_session = 
$GLOBALS[
'DIC'][
'ilAuthSession'];
 
  107        $force_login = 
false;
 
  109            !is_array($_REQUEST[
'cmd']) &&
 
  110            strcmp($_REQUEST[
'cmd'], 
'force_login') === 0
 
  116            $this->logger->debug(
'Force login');
 
  117            if ($auth_session->isValid()) {
 
  118                $this->logger->debug(
'Valid session -> logout current user');
 
  120                $auth_session->logout();
 
  122                $GLOBALS[
'ilAppEventHandler']->raise(
 
  123                    'Services/Authentication',
 
  130            $this->logger->debug(
'Show login page');
 
  137        if ($auth_session->isValid()) {
 
  138            $this->logger->debug(
'Valid session -> redirect to starting page');
 
  139            return ilInitialisation::redirectToStartingPage();
 
  141        $this->logger->debug(
'No valid session -> show login');
 
  154        $this->
getLogger()->debug(
'Showing login page');
 
  157        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentialsApache.php';
 
  159        $frontend->tryAuthenticationOnLoginPage();
 
  162        self::initStartUpTemplate(
"tpl.login.html");
 
  171        $page_editor_html = $this->showTermsOfServiceLink($page_editor_html);
 
  176        $tpl->setVariable(
"PAGETITLE", 
"- " . $this->lng->txt(
"startpage"));
 
  177        $tpl->setVariable(
"ILIAS_RELEASE", 
$ilSetting->get(
"ilias_version"));
 
  179        $this->ctrl->setTargetScript(
"ilias.php");
 
  182        if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
 
  187        if (strlen($page_editor_html)) {
 
  188            $tpl->setVariable(
'LPE', $page_editor_html);
 
  191        $tpl->fillWindowTitle();
 
  192        $tpl->fillCssFiles();
 
  193        $tpl->fillJavaScriptFiles();
 
  194        $tpl->show(
"DEFAULT", 
false);
 
  207        $this->
getLogger()->warning(
'Using deprecated startup method');
 
  210        $status = $ilAuth->getStatus();
 
  211        if ($status == 
"" && isset(
$_GET[
"auth_stat"])) {
 
  212            $status = 
$_GET[
"auth_stat"];
 
  215        if ($ilAuth->getAuth() && !$status) {
 
  217            if (
$_GET[
"rep_ref_id"] != 
"") {
 
  220            include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
  221            ilInitialisation::redirectToStartingPage();
 
  227            if (empty(
$_GET[
'cookies'])) {
 
  228                $additional_params = 
'';
 
  231                    "&ext_uid=" . 
$_GET[
"ext_uid"] . 
"&cookies=nocookies&client_id=" .
 
  232                    rawurlencode(CLIENT_ID) . 
"&lang=" . 
$lng->getLangKey() . $additional_params);
 
  237            unset(
$_GET[
'cookies']);
 
  241            require_once 
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
 
  246        if (isset($WAYF) && $WAYF->is_selection()) {
 
  247            if ($WAYF->is_valid_selection()) {
 
  249                $WAYF->setSAMLCookie();
 
  259        if (isset(
$_GET[
'reg_confirmation_msg']) && strlen(trim(
$_GET[
'reg_confirmation_msg']))) {
 
  260            $lng->loadLanguageModule(
'registration');
 
  261            if (
$_GET[
'reg_confirmation_msg'] == 
'reg_account_confirmation_successful') {
 
  266        } elseif (isset(
$_GET[
'reached_session_limit']) && 
$_GET[
'reached_session_limit']) {
 
  268        } elseif (isset(
$_GET[
'accdel']) && 
$_GET[
'accdel']) {
 
  269            $lng->loadLanguageModule(
'user');
 
  270            $failure = 
$lng->txt(
"user_account_deleted_confirmation");
 
  273        if (!empty($status)) {
 
  308                    $lng->loadLanguageModule(
'auth');
 
  312                    $lng->loadLanguageModule(
'cptch');
 
  340                    $username = $ilAuth->getExceededUserName(); 
 
  344                    if (
$ilSetting->get(
'user_reactivate_code')) {
 
  364                case AUTH_WRONG_LOGIN:
 
  367                    $auth_error = $ilias->getAuthError();
 
  368                    if (is_object($auth_error)) {
 
  369                        $add = 
"<br>" . $auth_error->getMessage();
 
  377            $lng->loadLanguageModule(
"auth");
 
  385        self::initStartUpTemplate(
"tpl.login.html");
 
  402        $page_editor_html = $this->showTermsOfServiceLink($page_editor_html);
 
  406        $tpl->setVariable(
"PAGETITLE", 
"- " . 
$lng->txt(
"startpage"));
 
  407        $tpl->setVariable(
"ILIAS_RELEASE", 
$ilSetting->get(
"ilias_version"));
 
  409        $this->ctrl->setTargetScript(
"ilias.php");
 
  413        if (isset(
$_GET[
'cookies']) && 
$_GET[
'cookies'] == 
'nocookies') {
 
  417        if (strlen($page_editor_html)) {
 
  418            $tpl->setVariable(
'LPE', $page_editor_html);
 
  421        $tpl->fillWindowTitle();
 
  422        $tpl->fillCssFiles();
 
  423        $tpl->fillJavaScriptFiles();
 
  425        $tpl->show(
"DEFAULT", 
false);
 
  432        self::initStartUpTemplate(
"tpl.login_reactivate_code.html");
 
  440        $tpl->setVariable(
"FORM", $a_form->getHTML());
 
  441        $tpl->show(
"DEFAULT", 
false);
 
  448        $lng->loadLanguageModule(
"auth");
 
  450        include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  453        $form->setFormAction(
$ilCtrl->getFormAction($this, 
'showcodeform'));
 
  454        $form->setTitle(
$lng->txt(
'auth_account_code_title'));
 
  457        $count->setRequired(
true);
 
  458        $count->setInfo(
$lng->txt(
'auth_account_code_info'));
 
  459        $form->addItem($count);
 
  463        $uname->setValue($a_username);
 
  464        $form->addItem($uname);
 
  466        $form->addCommandButton(
'processCode', 
$lng->txt(
'send'));
 
  485        if ($uname && 
$form->checkInput()) {
 
  488            include_once 
"Services/User/classes/class.ilAccountCode.php";
 
  497                $invalid_code = 
false;
 
  500                if ($valid_until === 
"0") {
 
  501                    $user->setTimeLimitUnlimited(
true);
 
  503                    if (is_numeric($valid_until)) {
 
  504                        $valid_until = strtotime(
"+" . $valid_until . 
"days");
 
  506                        $valid_until = explode(
"-", $valid_until);
 
  507                        $valid_until = mktime(
 
  515                        if ($valid_until < time()) {
 
  516                            $invalid_code = 
true;
 
  520                    if (!$invalid_code) {
 
  521                        $user->setTimeLimitUnlimited(
false);
 
  522                        $user->setTimeLimitUntil($valid_until);
 
  526                if (!$invalid_code) {
 
  527                    $user->setActive(
true);
 
  539                    $ilCtrl->setParameter($this, 
"cu", 1);
 
  540                    $GLOBALS[
'DIC']->language()->loadLanguageModule(
'auth');
 
  542                    $ilCtrl->redirect($this, 
"showLoginPage");
 
  546            $lng->loadLanguageModule(
"user");
 
  547            $field = 
$form->getItemByPostVar(
"code");
 
  548            $field->setAlert(
$lng->txt(
"user_account_code_not_valid"));
 
  551        $form->setValuesByPost();
 
  562        include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  564        $form->setFormAction($this->ctrl->getFormAction($this, 
''));
 
  565        $form->setName(
"formlogin");
 
  566        $form->setShowTopButtons(
false);
 
  567        $form->setTitle($this->lng->txt(
"login_to_ilias"));
 
  569        include_once 
'./Services/Authentication/classes/class.ilAuthModeDetermination.php';
 
  573            $visible_auth_methods = array();
 
  576                if (isset($option[
'hide_in_ui']) && $option[
'hide_in_ui']) {
 
  581                $radg->addOption($op1);
 
  582                if (isset($option[
'checked'])) {
 
  583                    $radg->setValue(
$key);
 
  585                $visible_auth_methods[] = $op1;
 
  588            if (count($visible_auth_methods) == 1) {
 
  589                $first_auth_method = current($visible_auth_methods);
 
  591                $hidden_auth_method->setValue($first_auth_method->getValue());
 
  592                $form->addItem($hidden_auth_method);
 
  594                $form->addItem($radg);
 
  598        $ti = 
new ilTextInputGUI($this->lng->txt(
"username"), 
"username");
 
  600        $ti->setRequired(
true);
 
  604        $pi->setUseStripSlashes(
false);
 
  605        $pi->setRetype(
false);
 
  606        $pi->setSkipSyntaxCheck(
true);
 
  608        $pi->setDisableHtmlAutoComplete(
false);
 
  609        $pi->setRequired(
true);
 
  612        require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
  613        if (ilCaptchaUtil::isActiveForLogin()) {
 
  614            require_once 
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
 
  615            $captcha = 
new ilCaptchaInputGUI($this->lng->txt(
'captcha_code'), 
'captcha_code');
 
  616            $captcha->setRequired(
true);
 
  617            $form->addItem($captcha);
 
  620        $form->addCommandButton(
"doStandardAuthentication", $this->lng->txt(
"log_in"));
 
  630        $this->
getLogger()->debug(
'Trying shibboleth authentication');
 
  632        include_once 
'./Services/AuthShibboleth/classes/class.ilAuthFrontendCredentialsShibboleth.php';
 
  634        $credentials->initFromRequest();
 
  636        include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
  640        include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
  643        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
  646        $frontend = $frontend_factory->getFrontend(
 
  653        $frontend->authenticate();
 
  655        switch ($status->getStatus()) {
 
  658                include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
  659                ilInitialisation::redirectToStartingPage();
 
  663                return $GLOBALS[
'ilCtrl']->redirect($this, 
'showAccountMigration');
 
  667                $GLOBALS[
'ilCtrl']->redirect($this, 
'showLoginPage');
 
  683        $this->
getLogger()->debug(
'Trying cas authentication');
 
  685        include_once 
'./Services/CAS/classes/class.ilAuthFrontendCredentialsCAS.php';
 
  688        include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
  692        include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
  695        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
  698        $frontend = $frontend_factory->getFrontend(
 
  705        $frontend->authenticate();
 
  706        switch ($status->getStatus()) {
 
  708                $this->
getLogger()->debug(
'Authentication successful.');
 
  709                ilInitialisation::redirectToStartingPage();
 
  725        $this->
getLogger()->debug(
'Trying lti authentication');
 
  728        $credentials->initFromRequest();
 
  731        $provider = $provider_factory->getProviderByAuthMode($credentials, AUTH_LTI_PROVIDER);
 
  737        $frontend = $frontend_factory->getFrontend(
 
  744        $frontend->authenticate();
 
  746        switch ($status->getStatus()) {
 
  749                ilInitialisation::redirectToStartingPage();
 
  753                return $GLOBALS[
'ilCtrl']->redirect($this, 
'showAccountMigration');
 
  757                $GLOBALS[
'ilCtrl']->redirect($this, 
'showLoginPage');
 
  772        $this->
getLogger()->debug(
'Trying apache authentication');
 
  774        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentialsApache.php';
 
  776        $credentials->initFromRequest();
 
  778        include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
  782        include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
  785        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
  788        $frontend = $frontend_factory->getFrontend(
 
  795        $frontend->authenticate();
 
  797        switch ($status->getStatus()) {
 
  800                if ($credentials->hasValidTargetUrl()) {
 
  803                    require_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
  804                    ilInitialisation::redirectToStartingPage();
 
  809                return $GLOBALS[
'ilCtrl']->redirect($this, 
'showAccountMigration');
 
  815                        $GLOBALS[
'ilCtrl']->getLinkTarget($this, 
'showLoginPage', 
'', 
false, 
false),
 
  833        if (
$form->checkInput()) {
 
  834            $this->
getLogger()->debug(
'Trying to authenticate user.');
 
  836            include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
 
  838            $credentials->setUsername(
$form->getInput(
'username'));
 
  839            $credentials->setPassword(
$form->getInput(
'password'));
 
  840            $credentials->setCaptchaCode(
$form->getInput(
'captcha_code'));
 
  843            include_once 
'./Services/Authentication/classes/class.ilAuthModeDetermination.php';
 
  846                $credentials->setAuthMode(
$form->getInput(
'auth_mode'));
 
  849            include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
  851            $providers = $provider_factory->getProviders($credentials);
 
  853            include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
  856            include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
  859            $frontend = $frontend_factory->getFrontend(
 
  866            $frontend->authenticate();
 
  868            switch ($status->getStatus()) {
 
  871                    include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
  872                    ilInitialisation::redirectToStartingPage();
 
  879                    return $GLOBALS[
'ilCtrl']->redirect($this, 
'showAccountMigration');
 
  923        return $page_editor_html;
 
  935        if (strlen($page_editor_html)) {
 
  937            return $page_editor_html;
 
  940        $loginSettings = 
new ilSetting(
"login_settings");
 
  941        $information = $loginSettings->get(
"login_message_" . 
$lng->getLangKey());
 
  943        if (strlen(trim($information))) {
 
  944            $tpl->setVariable(
"TXT_LOGIN_INFORMATION", $information);
 
  946        return $page_editor_html;
 
  962            $tpl = 
new ilTemplate(
'tpl.login_form_cas.html', 
true, 
true, 
'Services/Init');
 
  963            $tpl->setVariable(
"TXT_CAS_LOGIN", 
$lng->txt(
"login_to_ilias_via_cas"));
 
  965            $tpl->setVariable(
"TXT_CAS_LOGIN_INSTRUCTIONS", 
$ilSetting->get(
"cas_login_instructions"));
 
  966            $this->ctrl->setParameter($this, 
"forceCASLogin", 
"1");
 
  967            $tpl->setVariable(
"TARGET_CAS_LOGIN", $this->ctrl->getLinkTarget($this, 
"doCasAuthentication"));
 
  968            $this->ctrl->setParameter($this, 
"forceCASLogin", 
"");
 
  974                '[list-cas-login-form]',
 
  978        return $page_editor_html;
 
  995            $tpl = 
new ilTemplate(
'tpl.login_form_shibboleth.html', 
true, 
true, 
'Services/Init');
 
  997            $tpl->setVariable(
'SHIB_FORMACTION', 
'./shib_login.php'); 
 
  999            if (
$ilSetting->get(
"shib_hos_type") == 
'external_wayf') {
 
 1000                $tpl->setCurrentBlock(
"shibboleth_login");
 
 1001                $tpl->setVariable(
"TXT_SHIB_LOGIN", 
$lng->txt(
"login_to_ilias_via_shibboleth"));
 
 1002                $tpl->setVariable(
"IL_TARGET", 
$_GET[
"target"]);
 
 1003                $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", 
$ilSetting->get(
"shib_federation_name"));
 
 1004                $tpl->setVariable(
"TXT_SHIB_LOGIN_BUTTON", 
$ilSetting->get(
"shib_login_button"));
 
 1005                $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>.');
 
 1006                $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", 
$ilSetting->get(
"shib_login_instructions"));
 
 1007                $tpl->parseCurrentBlock();
 
 1008            } elseif (
$ilSetting->get(
"shib_hos_type") == 
'embedded_wayf') {
 
 1009                $tpl->setCurrentBlock(
"shibboleth_custom_login");
 
 1010                $customInstructions = stripslashes(
$ilSetting->get(
"shib_login_instructions"));
 
 1011                $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", $customInstructions);
 
 1012                $tpl->parseCurrentBlock();
 
 1014                $tpl->setCurrentBlock(
"shibboleth_wayf_login");
 
 1015                $tpl->setVariable(
"TXT_SHIB_LOGIN", 
$lng->txt(
"login_to_ilias_via_shibboleth"));
 
 1016                $tpl->setVariable(
"TXT_SHIB_FEDERATION_NAME", 
$ilSetting->get(
"shib_federation_name"));
 
 1017                $tpl->setVariable(
"TXT_SELECT_HOME_ORGANIZATION", 
sprintf(
$lng->txt(
"shib_select_home_organization"), 
$ilSetting->get(
"shib_federation_name")));
 
 1018                $tpl->setVariable(
"TXT_CONTINUE", 
$lng->txt(
"btn_next"));
 
 1019                $tpl->setVariable(
"TXT_SHIB_HOME_ORGANIZATION", 
$lng->txt(
"shib_home_organization"));
 
 1020                $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>.');
 
 1021                $tpl->setVariable(
"TXT_SHIB_CUSTOM_LOGIN_INSTRUCTIONS", 
$ilSetting->get(
"shib_login_instructions"));
 
 1023                require_once 
"./Services/AuthShibboleth/classes/class.ilShibbolethWAYF.php";
 
 1026                $tpl->setVariable(
"TXT_SHIB_INVALID_SELECTION", $WAYF->showNotice());
 
 1027                $tpl->setVariable(
"SHIB_IDP_LIST", $WAYF->generateSelection());
 
 1028                $tpl->setVariable(
"ILW_TARGET", 
$_GET[
"target"]);
 
 1029                $tpl->parseCurrentBlock();
 
 1035        return $page_editor_html;
 
 1050        if (!strlen($page_editor_html)) {
 
 1051            $tpl->setVariable($fallback_tplvar, $element_html);
 
 1052            return $page_editor_html;
 
 1055        if (!stristr($page_editor_html, $placeholder)) {
 
 1056            $tpl->setVariable($fallback_tplvar, $element_html);
 
 1057            return $page_editor_html;
 
 1059        return str_replace($placeholder, $element_html, $page_editor_html);
 
 1070        include_once 
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
 
 1072        $active_lang = $lpe->getIliasEditorLanguage(
$lng->getLangKey());
 
 1074        if (!$active_lang) {
 
 1079        include_once 
'./Services/COPage/classes/class.ilPageUtil.php';
 
 1084        include_once 
'./Services/Authentication/classes/class.ilLoginPage.php';
 
 1085        include_once 
'./Services/Authentication/classes/class.ilLoginPageGUI.php';
 
 1087        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1089        $tpl->setCurrentBlock(
"SyntaxStyle");
 
 1091        $tpl->parseCurrentBlock();
 
 1096        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1097        $page_gui->setStyleId(0, 
'auth');
 
 1099        $page_gui->setPresentationTitle(
"");
 
 1100        $page_gui->setTemplateOutput(
false);
 
 1101        $page_gui->setHeader(
"");
 
 1102        $ret = $page_gui->showPage();
 
 1119        $rtpl = 
new ilTemplate(
'tpl.login_registration_links.html', 
true, 
true, 
'Services/Init');
 
 1122        include_once 
'Services/Registration/classes/class.ilRegistrationSettings.php';
 
 1124            $rtpl->setCurrentBlock(
"new_registration");
 
 1125            $rtpl->setVariable(
"REGISTER", 
$lng->txt(
"registration"));
 
 1128                $this->ctrl->getLinkTargetByClass(
"ilaccountregistrationgui", 
"")
 
 1130            $rtpl->parseCurrentBlock();
 
 1133        if (
$ilSetting->get(
"password_assistance")) {
 
 1134            $rtpl->setCurrentBlock(
"password_assistance");
 
 1135            $rtpl->setVariable(
"FORGOT_PASSWORD", 
$lng->txt(
"forgot_password"));
 
 1136            $rtpl->setVariable(
"FORGOT_USERNAME", 
$lng->txt(
"forgot_username"));
 
 1138                "CMD_FORGOT_PASSWORD",
 
 1139                $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui", 
"")
 
 1142                "CMD_FORGOT_USERNAME",
 
 1143                $this->ctrl->getLinkTargetByClass(
"ilpasswordassistancegui", 
"showUsernameAssistanceForm")
 
 1145            $rtpl->setVariable(
"LANG_ID", 
$lng->getLangKey());
 
 1146            $rtpl->parseCurrentBlock();
 
 1150            $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, 
"read", 
"", ROOT_FOLDER_ID)) {
 
 1151            $rtpl->setCurrentBlock(
"homelink");
 
 1152            $rtpl->setVariable(
"CLIENT_ID", 
"?client_id=" . 
$_COOKIE[
"ilClientId"] . 
"&lang=" . 
$lng->getLangKey());
 
 1153            $rtpl->setVariable(
"TXT_HOME", 
$lng->txt(
"home"));
 
 1154            $rtpl->parseCurrentBlock();
 
 1158            $rtpl->setCurrentBlock(
"client_list");
 
 1159            $rtpl->setVariable(
"TXT_CLIENT_LIST", 
$lng->txt(
"to_client_list"));
 
 1160            $rtpl->setVariable(
"CMD_CLIENT_LIST", $this->ctrl->getLinkTarget($this, 
"showClientList"));
 
 1161            $rtpl->parseCurrentBlock();
 
 1168            '[list-registration-link]',
 
 1169            'REG_PWD_CLIENT_LINKS' 
 1178    protected function showTermsOfServiceLink($page_editor_html)
 
 1186        require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
 
 1189            $utpl = 
new ilTemplate(
'tpl.login_terms_of_service_link.html', 
true, 
true, 
'Services/Init');
 
 1190            $utpl->setVariable(
'TXT_TERMS_OF_SERVICE', 
$lng->txt(
'usr_agreement'));
 
 1191            $utpl->setVariable(
'LINK_TERMS_OF_SERVICE', $this->ctrl->getLinkTarget($this, 
'showTermsOfService'));
 
 1197                '[list-user-agreement]',
 
 1206            '[list-user-agreement]',
 
 1220                '[list-language-selection] ',
 
 1221                '[list-registration-link]',
 
 1222                '[list-user-agreement]',
 
 1223                '[list-login-form]',
 
 1224                '[list-cas-login-form]',
 
 1225                '[list-shibboleth-login-form]' 
 1227            array(
'',
'',
'',
'',
'',
'',
''),
 
 1236    public function showAccountMigration($a_message = 
'')
 
 1244        $lng->loadLanguageModule(
'auth');
 
 1245        self::initStartUpTemplate(
'tpl.login_account_migration.html');
 
 1247        include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1249        $form->setFormAction($this->ctrl->getFormAction($this, 
'migrateAccount'));
 
 1251        $form->setTitle(
$lng->txt(
'auth_account_migration'));
 
 1252        $form->addCommandButton(
'migrateAccount', 
$lng->txt(
'save'));
 
 1253        $form->addCommandButton(
'showLogin', 
$lng->txt(
'cancel'));
 
 1259            $lng->txt(
'auth_account_migration_keep'),
 
 1260            static::ACCOUNT_MIGRATION_MIGRATE,
 
 1261            $lng->txt(
'auth_info_migrate')
 
 1264        $user->setRequired(
true);
 
 1267        $user->setMaxLength(128);
 
 1268        $keep->addSubItem($user);
 
 1271        $pass->setRetype(
false);
 
 1272        $pass->setRequired(
true);
 
 1275        $pass->setMaxLength(128);
 
 1276        $keep->addSubItem(
$pass);
 
 1277        $rad->addOption($keep);
 
 1280            $lng->txt(
'auth_account_migration_new'),
 
 1281            static::ACCOUNT_MIGRATION_NEW,
 
 1282            $lng->txt(
'auth_info_add')
 
 1284        $rad->addOption(
$new);
 
 1286        $form->addItem($rad);
 
 1288        $tpl->setVariable(
'MIG_FORM', 
$form->getHTML());
 
 1290        if (strlen($a_message)) {
 
 1294        $tpl->show(
'DEFAULT');
 
 1303        if (!isset(
$_POST[
'account_migration'])) {
 
 1304            $this->showAccountMigration(
 
 1305                $GLOBALS[
'DIC']->language()->txt(
'err_choose_migration_type')
 
 1311            (
$_POST[
'account_migration'] == self::ACCOUNT_MIGRATION_MIGRATE) &&
 
 1312            (!strlen(
$_POST[
'mig_username']) || !strlen(
$_POST[
'mig_password']))
 
 1314            $this->showAccountMigration(
 
 1315                $GLOBALS[
'DIC']->language()->txt(
'err_wrong_login')
 
 1320        if ((
int) 
$_POST[
'account_migration'] == self::ACCOUNT_MIGRATION_MIGRATE) {
 
 1323        if ((
int) 
$_POST[
'account_migration'] == static::ACCOUNT_MIGRATION_NEW) {
 
 1333        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontend.php';
 
 1335        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
 
 1339        include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
 1343        $this->logger->debug(
'Using provider: ' . get_class(
$provider) . 
' for further processing.');
 
 1345        include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
 1348        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
 1351        $frontend = $frontend_factory->getFrontend(
 
 1358        if ($frontend->migrateAccountNew()) {
 
 1359            include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
 1360            ilInitialisation::redirectToStartingPage();
 
 1364        $this->ctrl->redirect($this, 
'showAccountMigration');
 
 1375        include_once 
'./Services/Authentication/classes/class.ilAuthFactory.php';
 
 1377        $this->logger->debug(
'Starting account migration for user: ' . (
string) 
ilSession::get(
'mig_ext_account'));
 
 1380        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
 
 1382        $credentials->setUsername((
string) 
$_POST[
'mig_username']);
 
 1383        $credentials->setPassword((
string) 
$_POST[
'mig_password']);
 
 1385        include_once 
'./Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
 1389        include_once 
'./Services/Authentication/classes/class.ilAuthStatus.php';
 
 1392        include_once 
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
 1395        $frontend = $frontend_factory->getFrontend(
 
 1402        $frontend->authenticate();
 
 1404        switch ($status->getStatus()) {
 
 1406                $this->
getLogger()->debug(
'Account migration: authentication successful for ' . (
string) $_POST[
'mig_username']);
 
 1408                $provider = $provider_factory->getProviderByAuthMode(
 
 1413                $frontend = $frontend_factory->getFrontend(
 
 1420                    $frontend->migrateAccount(
$GLOBALS[
'DIC'][
'ilAuthSession'])
 
 1422                    include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
 1423                    ilInitialisation::redirectToStartingPage();
 
 1426                    $this->ctrl->redirect($this, 
'showAccountMigration');
 
 1431                $this->
getLogger()->info(
'Account migration failed for user ' . (
string) $_POST[
'mig_username']);
 
 1432                $this->showAccountMigration(
$GLOBALS[
'lng']->txt(
'err_wrong_login'));
 
 1447        $GLOBALS[
'DIC'][
'ilAuthSession']->logout();
 
 1449        $GLOBALS[
'ilAppEventHandler']->raise(
 
 1450            'Services/Authentication',
 
 1462            ilUtil::redirect(
'saml.php?action=logout&logout_url=' . urlencode(ILIAS_HTTP_PATH . 
'/login.php'));
 
 1466        self::initStartUpTemplate(
"tpl.logout.html");
 
 1469            $tpl->setCurrentBlock(
"homelink");
 
 1470            $tpl->setVariable(
"CLIENT_ID", 
"?client_id=" . 
$client_id . 
"&lang=" . 
$lng->getLangKey());
 
 1471            $tpl->setVariable(
"TXT_HOME", 
$lng->txt(
"home"));
 
 1472            $tpl->parseCurrentBlock();
 
 1476            $tpl->setCurrentBlock(
"client_list");
 
 1477            $tpl->setVariable(
"TXT_CLIENT_LIST", 
$lng->txt(
"to_client_list"));
 
 1478            $this->ctrl->setParameter($this, 
"client_id", 
$client_id);
 
 1481                $this->ctrl->getLinkTarget($this, 
"showClientList")
 
 1483            $tpl->parseCurrentBlock();
 
 1484            $this->ctrl->setParameter($this, 
"client_id", 
"");
 
 1487        $tpl->setVariable(
"TXT_PAGEHEADLINE", 
$lng->txt(
"logout"));
 
 1488        $tpl->setVariable(
"TXT_LOGOUT_TEXT", 
$lng->txt(
"logout_text"));
 
 1489        $tpl->setVariable(
"TXT_LOGIN", 
$lng->txt(
"login_to_ilias"));
 
 1490        $tpl->setVariable(
"CLIENT_ID", 
"?client_id=" . 
$client_id . 
"&lang=" . 
$lng->getLangKey());
 
 1503        $valid = $ilAuth->getValidationData();
 
 1505        self::initStartUpTemplate(
"tpl.user_mapping_selection.html");
 
 1509        if ($ilAuth->getSubStatus() == AUTH_WRONG_LOGIN) {
 
 1513        include_once(
'./Services/User/classes/class.ilObjUser.php');
 
 1514        if (count($email_user) == 1) {
 
 1516            $tpl->setCurrentBlock(
"one_user");
 
 1517            $tpl->setVariable(
"TXT_USERNAME", 
$lng->txt(
"username"));
 
 1518            $tpl->setVariable(
"VAL_USERNAME", current($email_user));
 
 1519            $tpl->setVariable(
"USER_ID", key($email_user));
 
 1520            $tpl->parseCurrentBlock();
 
 1522            foreach ($email_user as 
$key => $login) {
 
 1523                $tpl->setCurrentBlock(
"user");
 
 1525                $tpl->setVariable(
"VAL_USER", $login);
 
 1526                $tpl->parseCurrentBlock();
 
 1528            $tpl->setCurrentBlock(
"multpiple_user");
 
 1529            $tpl->parseCurrentBlock();
 
 1532        $tpl->setCurrentBlock(
"content");
 
 1533        $this->ctrl->setParameter($this, 
"ext_uid", urlencode(
$_GET[
"ext_uid"]));
 
 1534        $this->ctrl->setParameter($this, 
"soap_pw", urlencode(
$_GET[
"soap_pw"]));
 
 1535        $this->ctrl->setParameter($this, 
"auth_stat", 
$_GET[
"auth_stat"]);
 
 1538            $this->ctrl->getFormAction($this)
 
 1540        $tpl->setVariable(
"TXT_ILIAS_LOGIN", 
$lng->txt(
"login_to_ilias"));
 
 1541        if (count($email_user) == 1) {
 
 1542            $tpl->setVariable(
"TXT_EXPLANATION", 
$lng->txt(
"ums_explanation"));
 
 1543            $tpl->setVariable(
"TXT_EXPLANATION_2", 
$lng->txt(
"ums_explanation_2"));
 
 1545            $tpl->setVariable(
"TXT_EXPLANATION", 
$lng->txt(
"ums_explanation_3"));
 
 1546            $tpl->setVariable(
"TXT_EXPLANATION_2", 
$lng->txt(
"ums_explanation_4"));
 
 1548        $tpl->setVariable(
"TXT_CREATE_USER", 
$lng->txt(
"ums_create_new_account"));
 
 1549        $tpl->setVariable(
"TXT_PASSWORD", 
$lng->txt(
"password"));
 
 1551        $tpl->setVariable(
"TXT_SUBMIT", 
$lng->txt(
"login"));
 
 1570        $tpl->setAddFooter(
false); 
 
 1572        $tpl->setVariable(
"PAGETITLE", 
$lng->txt(
"clientlist_clientlist"));
 
 1576        self::initStartUpTemplate(
"tpl.client_list.html");
 
 1579        $tpl->addBlockfile(
"CLIENT_LIST", 
"client_list", 
"tpl.table.html");
 
 1582        $tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.obj_tbl_rows.html");
 
 1585        require_once(
"setup/classes/class.ilClientList.php");
 
 1586        require_once(
"setup/classes/class.ilClient.php");
 
 1587        require_once(
"setup/classes/class.ilDBConnections.php");
 
 1588        require_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
 1591        $list = $clientlist->getClients();
 
 1593        if (count(
$list) == 0) {
 
 1594            header(
"Location: ./setup/setup.php");
 
 1598        $hasPublicSection = 
false;
 
 1601            if (
$client->checkDatabaseExists(
true)) {
 
 1603                if (
$client->ini->readVariable(
"client", 
"access") and 
$client->getSetting(
"setup_ok")) {
 
 1604                    $this->ctrl->setParameter($this, 
"client_id", 
$key);
 
 1607                    $tmp[] = 
"<a href=\"" . 
"login.php?cmd=force_login&client_id=" . urlencode(
$key) . 
"\">" . 
$lng->txt(
"clientlist_login_page") . 
"</a>";
 
 1609                    if (
$client->getSetting(
'pub_section')) {
 
 1610                        $hasPublicSection = 
true;
 
 1611                        $tmp[] = 
"<a href=\"" . 
"ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode(
$key) . 
"\">" . 
$lng->txt(
"clientlist_start_page") . 
"</a>";
 
 1625        if ($hasPublicSection) {
 
 1626            $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
 
 1627            $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"), 
$lng->txt(
"clientlist_login"), 
$lng->txt(
"clientlist_public_access")));
 
 1628            $tbl->setHeaderVars(array(
"name",
"index",
"login"));
 
 1629            $tbl->setColumnWidth(array(
"50%",
"25%",
"25%"));
 
 1631            $tbl->setTitle(
$lng->txt(
"clientlist_available_clients"));
 
 1632            $tbl->setHeaderNames(array(
$lng->txt(
"clientlist_installation_name"), 
$lng->txt(
"clientlist_login"), 
''));
 
 1633            $tbl->setHeaderVars(array(
"name",
"login",
''));
 
 1634            $tbl->setColumnWidth(array(
"70%",
"25%",
'1px'));
 
 1638        $tbl->setOrderColumn(
$_GET[
"sort_by"], 
"name");
 
 1639        $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 1646        $tbl->disable(
"icon");
 
 1647        $tbl->disable(
"numinfo");
 
 1648        $tbl->disable(
"sort");
 
 1649        $tbl->disable(
"footer");
 
 1653        $tpl->show(
"DEFAULT", 
true, 
true);
 
 1665        $str = 
"<p style=\"margin:15px;\"> 
 1666                        You need to enable Session Cookies in your Browser to use ILIAS. 
 1669                        <br/>Tools -> Options -> Privacy -> Cookies 
 1670                        <br/>Enable 'Allow sites to set cookies' and activate option 'Keep 
 1671                        <br/>cookies' auf 'until I close Firefox' 
 1673                        <br/><b>Mozilla/Netscape</b> 
 1674                        <br/>Edit -> Preferences -> Privacy&Security -> Cookies 
 1675                        <br/>Go to 'Cookie Lifetime Policy' and check option 'Accept for current 
 1678                        <br/><b>Internet Explorer</b> 
 1679                        <br/>Tools -> Internet Options -> Privacy -> Advanced 
 1680                        <br/>- Check 'Override automatic cookie handling' 
 1681                        <br/>- Check 'Always allow session cookies' 
 1683        $tpl->setVariable(
"CONTENT", $str);
 
 1692        $this->showTermsOfService();
 
 1698    protected function showTermsOfService()
 
 1708        $back_to_login = (
'getAcceptance' != $this->ctrl->getCmd());
 
 1710        self::initStartUpTemplate(
'tpl.view_terms_of_service.html', $back_to_login, !$back_to_login);
 
 1711        $tpl->setVariable(
'TXT_PAGEHEADLINE', 
$lng->txt(
'usr_agreement'));
 
 1713        require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
 
 1715        if ($document->exists()) {
 
 1716            if (
'getAcceptance' == $this->ctrl->getCmd()) {
 
 1717                if (isset(
$_POST[
'status']) && 
'accepted' == 
$_POST[
'status']) {
 
 1718                    require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
 
 1730                $tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this, $this->ctrl->getCmd()));
 
 1732                $tpl->setVariable(
'ACCEPT_TERMS_OF_SERVICE', 
$lng->txt(
'accept_usr_agreement'));
 
 1733                $tpl->setVariable(
'TXT_SUBMIT', 
$lng->txt(
'submit'));
 
 1736            $tpl->setPermanentLink(
'usr', 
null, 
'agreement');
 
 1737            $tpl->setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->getContent());
 
 1739            include_once(
"./Modules/SystemFolder/classes/class.ilSystemSupportContacts.php");
 
 1754        if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isValid()) {
 
 1755            include_once 
'./Services/Init/classes/class.ilInitialisation.php';
 
 1756            ilInitialisation::redirectToStartingPage();
 
 1762            !isset(
$_GET[
"client_id"]) &&
 
 1763            (
$_GET[
"cmd"] == 
"") &&
 
 1779        global $objDefinition, $ilPluginAdmin, 
$ilUser;
 
 1781        if (is_object($ilPluginAdmin)) {
 
 1783            $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"UIComponent", 
"uihk");
 
 1786            foreach ($pl_names as $pl) {
 
 1788                $gui_class = $ui_plugin->getUIClassInstance();
 
 1789                $resp = $gui_class->checkGotoHook($a_target);
 
 1790                if ($resp[
"target"] !== 
false) {
 
 1791                    $a_target = $resp[
"target"];
 
 1797        if ($a_target == 
"") {
 
 1801        $t_arr = explode(
"_", $a_target);
 
 1804        if (
$type == 
"git") {
 
 1812        $class = $objDefinition->getClassName(
$type);
 
 1818        $full_class = 
"ilObj" . $class . 
"Access";
 
 1819        include_once(
$location . 
"/class." . $full_class . 
".php");
 
 1821        $ret = call_user_func(array($full_class, 
"_checkGoto"), $a_target);
 
 1825            !stristr($a_target, 
"_wsp") &&
 
 1826            $ilUser->getId() != ANONYMOUS_USER_ID && 
 
 1827            !$objDefinition->isAdministrationObject(
$type) &&
 
 1828            $objDefinition->isRBACObject(
$type) &&
 
 1830            global $tree, $rbacsystem, $ilAccess;
 
 1833            if ($t_arr[0] == 
"pg") {
 
 1834                if (isset($t_arr[2])) {
 
 1835                    $ref_id = $t_arr[2];
 
 1840                        $ref_id = array_shift($ref_id);
 
 1844                $ref_id = $t_arr[1];
 
 1847            include_once 
"Services/Membership/classes/class.ilParticipants.php";
 
 1848            $block_obj = array();
 
 1851            $path = $tree->getPathId($ref_id);
 
 1853            foreach (
$path as $path_ref_id) {
 
 1854                $redirect_infopage = 
false;
 
 1855                $add_member_role = 
false;
 
 1861                if (!$ilAccess->doActivationCheck(
"read", 
"", $path_ref_id, 
$ilUser->getId(), $pobj_id, $ptype) ||
 
 1862                    !$ilAccess->doStatusCheck(
"read", 
"", $path_ref_id, 
$ilUser->getId(), $pobj_id, $ptype)) {
 
 1865                } elseif ($ptype == 
"crs") {
 
 1867                    include_once 
"Modules/Course/classes/class.ilCourseParticipant.php";
 
 1869                    if (!$participants->isAssigned()) {
 
 1871                        include_once 
"Modules/Course/classes/class.ilObjCourse.php";
 
 1874                            $block_obj[] = $path_ref_id;
 
 1875                            $add_member_role = 
true;
 
 1877                            $redirect_infopage = 
true;
 
 1880                } elseif ($ptype == 
"grp") {
 
 1882                    include_once 
"Modules/Group/classes/class.ilGroupParticipants.php";
 
 1885                        include_once 
"Modules/Group/classes/class.ilObjGroup.php";
 
 1887                        if ($group_obj->isRegistrationEnabled()) {
 
 1888                            $block_obj[] = $path_ref_id;
 
 1889                            $add_member_role = 
true;
 
 1891                            $redirect_infopage = 
true;
 
 1897                if ($add_member_role) {
 
 1899                    $rbacsystem->resetPACache(
$ilUser->getId(), $path_ref_id);
 
 1900                    if (!$rbacsystem->checkAccess(
"join", $path_ref_id)) {
 
 1901                        $redirect_infopage = 
true;
 
 1903                        $rbacsystem->addTemporaryRole(
 
 1911                if ($redirect_infopage) {
 
 1912                    if ($rbacsystem->checkAccess(
"visible", $path_ref_id)) {
 
 1914                            "&ref_id=" . $path_ref_id . 
"&cmd=infoScreen");
 
 1922            $rbacsystem->resetPACache(
$ilUser->getId(), $ref_id);
 
 1923            if ($rbacsystem->checkAccess(
"read", $ref_id) && 
sizeof($block_obj)) { 
 
 1929                $_SESSION[
"pending_goto"] = 
"goto.php?target=" . $a_target;
 
 1933                    "&ref_id=" . array_shift($block_obj));
 
 1940    public function confirmRegistration()
 
 1944        if (!isset(
$_GET[
'rh']) || !strlen(trim(
$_GET[
'rh']))) {
 
 1945            $this->ctrl->redirectToURL(
'./login.php?cmd=force_login®_confirmation_msg=reg_confirmation_hash_not_passed');
 
 1954            $user->setActive(
true);
 
 1956            if ($oRegSettings->passwordGenerationEnabled()) {
 
 1960                $user->setLastPasswordChangeTS(time());
 
 1964            $target = $user->getPref(
'reg_target');
 
 1975            $accountMail->withEmailConfirmationRegistrationMode()->send($user, 
$password);
 
 1977            $this->ctrl->redirectToURL(
sprintf(
 
 1978                './login.php?cmd=force_login®_confirmation_msg=reg_account_confirmation_successful&lang=%s',
 
 1979                $user->getLanguage()
 
 1983            $soap_client->setResponseTimeout(1);
 
 1984            $soap_client->enableWSDL(
true);
 
 1985            $soap_client->init();
 
 1987            $this->logger->info(
'Triggered soap call (background process) for deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
 
 1990                'deleteExpiredDualOptInUserObjects',
 
 1993                    $exception->getCode() 
 
 1997            $this->ctrl->redirectToURL(
sprintf(
 
 1998                './login.php?cmd=force_login®_confirmation_msg=%s',
 
 1999                $exception->getMessage()
 
 2002            $this->ctrl->redirectToURL(
sprintf(
 
 2003                './login.php?cmd=force_login®_confirmation_msg=%s',
 
 2004                $exception->getMessage()
 
 2015    public static function initStartUpTemplate($a_tmpl, $a_show_back = 
false, $a_show_logout = 
false)
 
 2027        include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 2031        include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
 
 2034        $tpl->addBlockfile(
'CONTENT', 
'content', 
'tpl.startup_screen.html', 
'Services/Init');
 
 2040            $param = 
'client_id=' . 
$_COOKIE[
'ilClientId'] . 
'&lang=' . 
$lng->getLangKey();
 
 2042            $tpl->setCurrentBlock(
'link_item_bl');
 
 2043            $tpl->setVariable(
'LINK_TXT', 
$lng->txt(
'login_to_ilias'));
 
 2044            $tpl->setVariable(
'LINK_URL', 
'login.php?cmd=force_login&' . $param);
 
 2045            $tpl->parseCurrentBlock();
 
 2047            include_once 
'./Services/Init/classes/class.ilPublicSectionSettings.php';
 
 2049                $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, 
'read', 
'', ROOT_FOLDER_ID)) {
 
 2050                $tpl->setVariable(
'LINK_URL', 
'index.php?' . $param);
 
 2051                $tpl->setVariable(
'LINK_TXT', 
$lng->txt(
'home'));
 
 2052                $tpl->parseCurrentBlock();
 
 2054        } elseif ($a_show_logout) {
 
 2055            $tpl->setCurrentBlock(
'link_item_bl');
 
 2056            $tpl->setVariable(
'LINK_TXT', 
$lng->txt(
'logout'));
 
 2057            $tpl->setVariable(
'LINK_URL', ILIAS_HTTP_PATH . 
'/logout.php');
 
 2058            $tpl->parseCurrentBlock();
 
 2061        if (is_array($a_tmpl)) {
 
 2062            $template_file = $a_tmpl[0];
 
 2063            $template_dir  = $a_tmpl[1];
 
 2065            $template_file = $a_tmpl;
 
 2066            $template_dir  = 
'Services/Init';
 
 2070        include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
 
 2071        $header_top_title = ilObjSystemFolder::_getHeaderTitle();
 
 2072        if (trim($header_top_title) != 
"" && 
$tpl->blockExists(
"header_top_title")) {
 
 2073            $tpl->setCurrentBlock(
"header_top_title");
 
 2074            $tpl->setVariable(
"TXT_HEADER_TITLE", $header_top_title);
 
 2075            $tpl->parseCurrentBlock();
 
 2081            $tpl->setCurrentBlock(
"lang_select");
 
 2082            $tpl->setVariable(
"TXT_LANGSELECT", 
$lng->txt(
"language"));
 
 2083            $tpl->setVariable(
"LANG_SELECT", $selection);
 
 2084            $tpl->parseCurrentBlock();
 
 2087        $tpl->addBlockFile(
'STARTUP_CONTENT', 
'startup_content', $template_file, $template_dir);
 
 2096        include_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
 
 2106        require_once 
'Services/Saml/classes/class.ilSamlIdp.php';
 
 2107        require_once 
'Services/Saml/classes/class.ilSamlSettings.php';
 
 2110            $tpl = 
new ilTemplate(
'tpl.login_form_saml.html', 
true, 
true, 
'Services/Saml');
 
 2113            if (isset(
$_GET[
'target'])) {
 
 2117            $tpl->setVariable(
'SAML_SCRIPT_URL', 
'./saml.php' . $return);
 
 2118            $tpl->setVariable(
'TXT_LOGIN', 
$GLOBALS[
'DIC']->language()->txt(
'saml_log_in'));
 
 2119            $tpl->setVariable(
'LOGIN_TO_ILIAS_VIA_SAML', 
$GLOBALS[
'DIC']->language()->txt(
'login_to_ilias_via_saml'));
 
 2120            $tpl->setVariable(
'TXT_SAML_LOGIN_TXT', 
$GLOBALS[
'DIC']->language()->txt(
'saml_login_form_txt'));
 
 2121            $tpl->setVariable(
'TXT_SAML_LOGIN_INFO_TXT', 
$GLOBALS[
'DIC']->language()->txt(
'saml_login_form_info_txt'));
 
 2127                '[list-saml-login-form]',
 
 2132        return $page_editor_html;
 
 2142        $this->
getLogger()->debug(
'Trying saml authentication');
 
 2144        $request = 
$DIC->http()->request();
 
 2145        $params  = $request->getQueryParams();
 
 2147        require_once 
'Services/Saml/classes/class.ilSamlAuthFactory.php';
 
 2158        if (isset(
$params[
'returnTo'])) {
 
 2162        if (!
$auth->isAuthenticated()) {
 
 2163            if (!isset(
$_GET[
'idpentityid']) || !isset(
$_GET[
'saml_idp_id'])) {
 
 2165                if (1 == count($activeIdps)) {
 
 2166                    $idp = current($activeIdps);
 
 2167                    $_GET[
'idpentityid'] = 
$idp->getEntityId();
 
 2168                    $_GET[
'saml_idp_id'] = 
$idp->getIdpId();
 
 2169                } elseif (0 == count($activeIdps)) {
 
 2170                    $GLOBALS[
'DIC']->ctrl()->redirect($this, 
'showLoginPage');
 
 2176            $auth->storeParam(
'idpId', (
int) 
$_GET[
'saml_idp_id']);
 
 2181        $auth->protectResource();
 
 2187        require_once 
'Services/Saml/classes/class.ilAuthFrontendCredentialsSaml.php';
 
 2189        $credentials->initFromRequest();
 
 2191        require_once 
'Services/Authentication/classes/Provider/class.ilAuthProviderFactory.php';
 
 2195        require_once 
'Services/Authentication/classes/class.ilAuthStatus.php';
 
 2198        require_once 
'Services/Authentication/classes/Frontend/class.ilAuthFrontendFactory.php';
 
 2201        $frontend = $frontend_factory->getFrontend(
 
 2208        $frontend->authenticate();
 
 2210        switch ($status->getStatus()) {
 
 2213                require_once 
'Services/Init/classes/class.ilInitialisation.php';
 
 2214                return ilInitialisation::redirectToStartingPage();
 
 2217                return $GLOBALS[
'DIC']->ctrl()->redirect($this, 
'showAccountMigration');
 
 2221                $GLOBALS[
'DIC']->ctrl()->redirect($this, 
'showLoginPage');
 
 2239        self::initStartUpTemplate(array(
'tpl.saml_idp_selection.html', 
'Services/Saml'));
 
 2241        $mainTpl  = 
$DIC->ui()->mainTemplate();
 
 2243        $renderer = 
$DIC->ui()->renderer();
 
 2245        $DIC->ctrl()->setTargetScript(
'saml.php');
 
 2249        require_once 
'Services/Saml/classes/class.ilSamlIdpSelectionTableGUI.php';
 
 2252        foreach ($idps as 
$idp) {
 
 2253            $DIC->ctrl()->setParameter($this, 
'saml_idp_id', 
$idp->getIdpId());
 
 2254            $DIC->ctrl()->setParameter($this, 
'idpentityid', urlencode(
$idp->getEntityId()));
 
 2257                'idp_link' => $renderer->render(
$factory->link()->standard(
$idp->getEntityId(), 
$DIC->ctrl()->getLinkTarget($this, 
'doSamlAuthentication')))
 
 2262        $mainTpl->setVariable(
'CONTENT', 
$table->getHtml());
 
 2264        $mainTpl->fillWindowTitle();
 
 2265        $mainTpl->fillCssFiles();
 
 2266        $mainTpl->fillJavaScriptFiles();
 
 2267        $mainTpl->show(
'DEFAULT', 
false);
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
const AUTH_SOAP_NO_ILIAS_USER
const AUTH_USER_SIMULTANEOUS_LOGIN
const AUTH_CAPTCHA_INVALID
const AUTH_CAS_NO_ILIAS_USER
const AUTH_RADIUS_NO_ILIAS_USER
const AUTH_USER_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 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 _getLocalAccountsForEmail($a_email)
check whether external account and authentication method matches with a user
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
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()
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)
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
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
getLoginPageEditorHTML()
Get HTML of ILIAS login page editor.
initCodeForm($a_username)
showLoginInformation($page_editor_html)
Show login information.
showUserMappingSelection()
Show user selection screen, if external account could not be mapped to an ILIAS account,...
doCasAuthentication()
Try CAS auth.
showNoCookiesScreen()
show help screen, if cookies are disabled
showRegistrationLinks($page_editor_html)
Show registration, password forgotten, client slection links @global ilLanguage $lng @global ilSettin...
doMigrationNewAccount()
Create new account for migration.
showSamlLoginForm($page_editor_html)
special template class to simplify handling of ITX/PEAR
static trackAcceptance(ilObjUser $user, ilTermsOfServiceSignableDocument $document)
static getByLanguageObject(ilLanguage $lng)
This class represents a text property in a property form.
static 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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
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
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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']