ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
class.ilAccountRegistrationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23use ILIAS\Language\UserSettings\Language as LanguageSetting;
25use ILIAS\User\Settings\Settings as UserSettings;
30
35{
37 protected bool $code_enabled = false;
38 protected bool $code_was_used;
40
43
44 protected ?ilPropertyFormGUI $form = null;
45 protected Container $dic;
46
49 protected ilLanguage $lng;
50 protected ilDBInterface $db;
52 protected ?ilObjUser $userObj = null;
59
61 protected \ILIAS\HTTP\Services $http;
62
63 public function __construct()
64 {
65 global $DIC;
66
67 $this->dic = $DIC;
68 $this->tpl = $DIC->ui()->mainTemplate();
69
70 $this->ctrl = $DIC->ctrl();
71 $this->ctrl->saveParameter($this, 'lang');
72 $this->lng = $DIC->language();
73 $this->lng->loadLanguageModule('registration');
74 $this->db = $DIC->database();
75 $this->error = $DIC['ilErr'];
76 $this->settings = $DIC->settings();
77 $this->globalUser = $DIC->user();
78 $this->rbacreview = $DIC->rbac()->review();
79 $this->rbacadmin = $DIC->rbac()->admin();
80 $this->ui_factory = $DIC->ui()->factory();
81 $this->ui_renderer = $DIC->ui()->renderer();
82
83 $this->registration_settings = new ilRegistrationSettings();
84 $this->code_enabled = ($this->registration_settings->registrationCodeRequired() ||
85 $this->registration_settings->getAllowCodes());
86
87 $this->recommended_content_manager = new ilRecommendedContentManager();
88
89 $this->user_profile = $DIC['user']->getProfile();
90 $this->user_settings = $DIC['user']->getSettings();
91
92 $this->http = $DIC->http();
93 $this->refinery = $DIC->refinery();
94 }
95
96 public function executeCommand(): void
97 {
98 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DISABLED) {
99 $this->error->raiseError($this->lng->txt('reg_disabled'), $this->error->MESSAGE);
100 }
101
102 $cmd = $this->ctrl->getCmd();
103 switch ($cmd) {
104 case 'saveForm':
105 $tpl = $this->$cmd();
106 break;
107 default:
108 $tpl = $this->displayForm();
109 }
110
111 $this->tpl->setPermanentLink('usr', null, 'registration');
113 }
114
116 {
117 $tpl = ilStartUpGUI::initStartUpTemplate(['tpl.usr_registration.html', 'components/ILIAS/Registration'], true);
118 $tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
119
120 if (!$this->form) {
121 $this->initForm();
122 }
123 $tpl->setVariable('FORM', $this->form->getHTML());
124 return $tpl;
125 }
126
127 protected function initForm(): void
128 {
129 $this->globalUser->setLanguage($this->lng->getLangKey());
130 $this->globalUser->setId(ANONYMOUS_USER_ID);
131
132 // needed for multi-text-fields (interests)
134
135 $this->form = new ilPropertyFormGUI();
136 $this->form->setFormAction($this->ctrl->getFormAction($this));
137
138 // code handling
139 if ($this->code_enabled) {
140 $field = new ilFormSectionHeaderGUI();
141 $field->setTitle($this->lng->txt('registration_codes_type_reg'));
142 $this->form->addItem($field);
143 $code = new ilTextInputGUI($this->lng->txt('registration_code'), 'usr_registration_code');
144 $code->setSize(40);
145 $code->setMaxLength(ilRegistrationCode::CODE_LENGTH);
146 if ($this->registration_settings->registrationCodeRequired()) {
147 $code->setRequired(true);
148 $code->setInfo($this->lng->txt('registration_code_required_info'));
149 } else {
150 $code->setInfo($this->lng->txt('registration_code_optional_info'));
151 }
152 $this->form->addItem($code);
153 }
154
155 $this->addLoginSectionToForm();
156
157 $this->lng->loadLanguageModule('user');
158 // add fields to form
159 $this->user_profile->addFieldsToForm($this->form, Context::Registration, true, null, [Alias::class]);
160
161 $field = new ilFormSectionHeaderGUI();
162 $field->setTitle($this->lng->txt('settings'));
163 $this->form->addItem($field);
164
165 $lang_setting = $this->user_settings->getSettingByDefinitionClass(LanguageSetting::class);
166 $flang = $lang_setting->getLegacyInput($this->lng, $this->settings);
167 $flang->setDisabled(!$lang_setting->isChangeableByUser());
168 if ($flang) {
169 $flang->setValue($this->lng->getLangKey());
170 }
171 $this->form->addItem($flang);
172
173 // add information to role selection (if not hidden)
174 $role = $this->buildRolesInput();
175 if ($role !== null) {
176 if ($this->code_enabled) {
177 $role->setInfo($this->lng->txt('registration_code_role_info'));
178 }
179 $this->form->addItem($role);
180 }
181
182 // #11407
183 $domains = [];
184 foreach ($this->registration_settings->getAllowedDomains() as $item) {
185 if (trim($item)) {
186 $domains[] = $item;
187 }
188 }
189 if (count($domains)) {
190 $mail_obj = $this->form->getItemByPostVar('email');
191 $mail_obj->setInfo(sprintf(
192 $this->lng->txt('reg_email_domains'),
193 implode(', ', $domains)
194 ) . '<br />' .
195 ($this->code_enabled ? $this->lng->txt('reg_email_domains_code') : ''));
196 }
197
198 // #14272
199 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
200 $mail_obj = $this->form->getItemByPostVar('email');
201 if ($mail_obj) { // #16087
202 $mail_obj->setRequired(true);
203 }
204 }
205
206 global $DIC;
207 array_map($this->form->addItem(...), $DIC['legalDocuments']->selfRegistration()->legacyInputGUIs());
208
209 $this->form->addCommandButton('saveForm', $this->lng->txt('register'));
210 }
211
213 {
214 $this->initForm();
215 $form_valid = $this->form->checkInput();
216
217 // custom validation
218 $valid_code = $valid_role = false;
219
220 // code
221 if ($this->code_enabled) {
222 $code = $this->form->getInput('usr_registration_code');
223 // could be optional
224 if (
225 $code !== '' ||
226 $this->registration_settings->registrationCodeRequired()
227 ) {
228 // code validation
230 $code_obj = $this->form->getItemByPostVar('usr_registration_code');
231 $code_obj->setAlert($this->lng->txt('registration_code_not_valid'));
232 $form_valid = false;
233 } else {
234 $valid_code = true;
235
236 // get role from code, check if (still) valid
237 $role_id = ilRegistrationCode::getCodeRole($code);
238 if ($role_id && $this->rbacreview->isGlobalRole($role_id)) {
239 $valid_role = $role_id;
240 }
241 }
242 }
243 }
244
245 // valid codes override email domain check
246 if (!$valid_code) {
247 // validate email against restricted domains
248 $email = $this->form->getInput('email');
249 if ($email) {
250 // #10366
251 $domains = [];
252 foreach ($this->registration_settings->getAllowedDomains() as $item) {
253 if (trim($item)) {
254 $domains[] = $item;
255 }
256 }
257 if (count($domains)) {
258 $mail_valid = false;
259 foreach ($domains as $domain) {
260 $domain = str_replace('*', '~~~', $domain);
261 $domain = preg_quote($domain, '/');
262 $domain = str_replace('~~~', '.+', $domain);
263 if (preg_match('/^' . $domain . '$/', $email, $hit)) {
264 $mail_valid = true;
265 break;
266 }
267 }
268 if (!$mail_valid) {
269 $mail_obj = $this->form->getItemByPostVar('email');
270 $mail_obj->setAlert(sprintf(
271 $this->lng->txt('reg_email_domains'),
272 implode(', ', $domains)
273 ));
274 $form_valid = false;
275 }
276 }
277 }
278 }
279
280 $error_lng_var = '';
281 if (
282 !$this->registration_settings->passwordGenerationEnabled() &&
284 $this->form->getInput('password'),
285 $this->form->getInput('username'),
286 $error_lng_var
287 )
288 ) {
289 $passwd_obj = $this->form->getItemByPostVar('password');
290 $passwd_obj->setAlert($this->lng->txt($error_lng_var));
291 $form_valid = false;
292 }
293
294 global $DIC;
295 $form_valid = $DIC['legalDocuments']->selfRegistration()->saveLegacyForm($this->form) && $form_valid;
296
297 // no need if role is attached to code
298 if (!$valid_role) {
299 // manual selection
300 if ($this->registration_settings->roleSelectionEnabled()) {
301 $selected_role = $this->form->getInput('usr_roles');
302 if ($selected_role && ilObjRole::_lookupAllowRegister((int) $selected_role)) {
303 $valid_role = (int) $selected_role;
304 }
305 } // assign by email
306 else {
307 $registration_role_assignments = new ilRegistrationRoleAssignments();
308 $valid_role = $registration_role_assignments->getRoleByEmail($this->form->getInput('email'));
309 }
310 }
311
312 // no valid role could be determined
313 if (!$valid_role && (!isset($selected_role) || $selected_role !== '')) {
314 $this->tpl->setOnScreenMessage('info', $this->lng->txt('registration_no_valid_role'));
315 $form_valid = false;
316 }
317
318 // validate username
319 $login_obj = $this->form->getItemByPostVar('username');
320 $login = $this->form->getInput('username');
321 if (!ilUtil::isLogin($login)) {
322 $login_obj->setAlert($this->lng->txt('login_invalid'));
323 $form_valid = false;
324 }
325
326 // We should use the HTTP request stretching mechanisms here, according to Mantis #32037
327 $username_checked_and_register_callback = function () use (&$form_valid, $login, $login_obj, $valid_role) {
328 if ($form_valid) {
329 if (ilObjUser::_loginExists($login)) {
330 $login_obj->setAlert($this->lng->txt('login_exists'));
331 $form_valid = false;
332 } elseif ($this->user_profile->userFieldEditableByUser(Alias::class) &&
333 (int) $this->settings->get('reuse_of_loginnames') === 0 &&
335 $login_obj->setAlert($this->lng->txt('login_exists'));
336 $form_valid = false;
337 }
338 }
339
340 if ($form_valid) {
341 $password = $this->createUser($valid_role);
342 $this->distributeMails($password);
343 }
344 };
345
346 if (($register_duration = $this->settings->get('registration_duration')) !== null) {
347 $duration = $this->http->durations()->callbackDuration((int) $register_duration);
348 $duration->stretch($username_checked_and_register_callback);
349 } else {
350 $username_checked_and_register_callback();
351 }
352
353 if ($form_valid) {
354 return $this->login();
355 }
356
357 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
358 $this->form->setValuesByPost();
359 return $this->displayForm();
360 }
361
362 protected function createUser(int $a_role): string
363 {
364 // something went wrong with the form validation
365 if (!$a_role) {
366 global $DIC;
367
368 $ilias = $DIC['ilias'];
369 $ilias->raiseError(
370 'Invalid role selection in registration' .
371 ', IP: ' . $_SERVER['REMOTE_ADDR'],
372 $ilias->error_obj->FATAL
373 );
374 }
375
376 $this->userObj = new ilObjUser();
377 if ((int) $this->settings->get('auth_mode') !== ilAuthUtils::AUTH_LOCAL) {
378 $this->userObj->setAuthMode('local');
379 }
380
381 $this->userObj = $this->user_profile->addFormValuesToUser(
382 $this->form,
383 Context::Registration,
384 $this->userObj
385 );
386 $this->userObj->setTitle($this->userObj->getFullname());
387 $this->userObj->setDescription($this->userObj->getEmail());
388
389 $this->userObj->setLogin(
390 $this->form->getInput('username')
391 );
392
393 if ($this->registration_settings->passwordGenerationEnabled()) {
395 $password = $password[0];
396 } else {
397 $password = $this->form->getInput('password');
398 }
399
400 $this->userObj->setLanguage(
401 $this->user_settings->getValueFromLegacyFormByDefinitionClass(
402 LanguageSetting::class,
403 $this->form
404 )
405 );
406
407 $this->userObj->setPasswd($password);
408
409 $access_limit = null;
410
411 $this->code_was_used = false;
412 $code_has_access_limit = false;
413 $code_local_roles = [];
414 if ($this->code_enabled) {
415 $code_local_roles = $code_has_access_limit = null;
416
417 // #10853 - could be optional
418 $code = $this->form->getInput('usr_registration_code');
419 if ($code) {
420 // set code to used
422 $this->code_was_used = true;
423
424 // handle code attached local role(s) and access limitation
425 $code_data = ilRegistrationCode::getCodeData($code);
426 if ($code_data['role_local']) {
427 // need user id before we can assign role(s)
428 $code_local_roles = explode(';', $code_data['role_local']);
429 }
430 if ($code_data['alimit']) {
431 // see below
432 $code_has_access_limit = true;
433
434 switch ($code_data['alimit']) {
435 case 'absolute':
436 $abs = date_parse($code_data['alimitdt']);
437 $access_limit = mktime(23, 59, 59, $abs['month'], $abs['day'], $abs['year']);
438 break;
439
440 case 'relative':
441 $rel = unserialize($code_data['alimitdt'], ['allowed_classes' => false]);
442 $access_limit = (int) ($rel['d'] * 86400 + $rel['m'] * 2592000 + $rel['y'] * 31536000 + time());
443 break;
444 }
445 }
446 }
447 }
448
449 // code access limitation will override any other access limitation setting
450 if (!($this->code_was_used && $code_has_access_limit) &&
451 $this->registration_settings->getAccessLimitation()) {
452 $access_limitations_obj = new ilRegistrationRoleAccessLimitations();
453 switch ($access_limitations_obj->getMode($a_role)) {
454 case 'absolute':
455 $access_limit = $access_limitations_obj->getAbsolute($a_role);
456 break;
457
458 case 'relative':
459 $rel_d = $access_limitations_obj->getRelative($a_role, 'd');
460 $rel_m = $access_limitations_obj->getRelative($a_role, 'm');
461 $access_limit = $rel_d * 86400 + $rel_m * 2592000 + time();
462 break;
463 }
464 }
465
466 if ($access_limit) {
467 $this->userObj->setTimeLimitUnlimited(false);
468 $this->userObj->setTimeLimitUntil($access_limit);
469 } else {
470 $this->userObj->setTimeLimitUnlimited(true);
471 $this->userObj->setTimeLimitUntil(time());
472 }
473
474 $this->userObj->setTimeLimitFrom(time());
475
477
478 $this->userObj->create();
479
480 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DIRECT ||
481 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_CODES ||
482 $this->code_was_used) {
483 $this->userObj->setActive(true, 0);
484 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
485 $this->userObj->setActive(false, 0);
486 } else {
487 $this->userObj->setActive(false, 0);
488 }
489
490 // set a timestamp for last_password_change
491 // this ts is needed by ilSecuritySettings
492 $this->userObj->setLastPasswordChangeTS(time());
493
494 $this->userObj->setIsSelfRegistered(true);
495
496 //insert user data in table user_data
497 $this->userObj->saveAsNew();
498
499 // don't update owner before the first save. updateOwner rereads the object which fails if it not save before
500 $this->userObj->updateOwner();
501
502 // setup user preferences
503 $this->userObj->setLanguage($this->form->getInput('usr_language'));
504
505 global $DIC;
506 $DIC['legalDocuments']->selfRegistration()->userCreation($this->userObj);
507
508 if ($this->http->wrapper()->query()->has('target')) {
509 $this->userObj->setPref(
510 'reg_target',
511 $this->http->wrapper()->query()->retrieve(
512 'target',
513 $this->refinery->kindlyTo()->string()
514 )
515 );
516 }
517 $this->userObj->setPref('bs_allow_to_contact_me', $this->settings->get('bs_allow_to_contact_me', 'n'));
518 $this->userObj->setPref('chat_osc_accept_msg', $this->settings->get('chat_osc_accept_msg', 'n'));
519 $this->userObj->setPref('chat_broadcast_typing', $this->settings->get('chat_broadcast_typing', 'n'));
520 $this->userObj->writePrefs();
521
522 $this->rbacadmin->assignUser($a_role, $this->userObj->getId());
523
524 // local roles from code
525 if ($this->code_was_used && is_array($code_local_roles)) {
526 $code_local_roles = array_map(intval(...), array_unique($code_local_roles));
527 foreach ($code_local_roles as $local_role_obj_id) {
528 // is given role (still) valid?
529 if (ilObject::_lookupType($local_role_obj_id) === 'role') {
530 $this->rbacadmin->assignUser($local_role_obj_id, $this->userObj->getId());
531
532 // patch to remove for 45 due to mantis 21953
533 $role_obj = $GLOBALS['DIC']['rbacreview']->getObjectOfRole($local_role_obj_id);
534 switch (ilObject::_lookupType($role_obj)) {
535 case 'crs':
536 case 'grp':
537 $role_refs = ilObject::_getAllReferences($role_obj);
538 $role_ref = end($role_refs);
539 // deactivated for now, see discussion at
540 // https://docu.ilias.de/goto_docu_wiki_wpage_5620_1357.html
541 // $this->recommended_content_manager->addObjectRecommendation($this->userObj->getId(), $role_ref);
542 break;
543 }
544 }
545 }
546 }
547
548 return (string) $password;
549 }
550
551 protected function distributeMails(string $password): void
552 {
553 // Send mail to approvers, if they are defined
554 if ($this->registration_settings->getApproveRecipients()) {
555 $mail = new ilRegistrationMailNotification();
556
557 if (!$this->code_was_used &&
558 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_APPROVE) {
560 } else {
562 }
563 $mail->setRecipients($this->registration_settings->getApproveRecipients());
564 $mail->setAdditionalInformation(['usr' => $this->userObj]);
565 $mail->send();
566 }
567 // Send mail to new user
568 // Registration with confirmation link ist enabled
569 $is_dual_opt_in_reg_mode = $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION;
570 if (!$this->code_was_used && $is_dual_opt_in_reg_mode) {
571 $dual_opt_in_service = new DualOptInServiceImpl(
572 $this->registration_settings,
573 new PendingRegistrationDatabaseRepository($this->dic->database()),
574 $this->dic->database(),
575 $this->dic->logger()->user(),
576 (new \ILIAS\Data\Factory())->clock()
577 );
578 $dual_opt_in_service->distributeMailsOnRegistration($this->userObj);
579 } else {
580 $accountMail = new ilAccountRegistrationMail(
581 $this->registration_settings,
583 new NewAccountMail\Repository($this->db)
584 );
585 $accountMail->withDirectRegistrationMode()->send($this->userObj, $password, $this->code_was_used);
586 }
587 }
588
590 {
591 $tpl = ilStartUpGUI::initStartUpTemplate(['tpl.usr_registered.html', 'components/ILIAS/Registration'], false);
592 $this->tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
593
594 $tpl->setVariable('TXT_WELCOME', $this->lng->txt('welcome') . ', ' . $this->userObj->getTitle() . '!');
595 if (
596 (
597 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DIRECT ||
598 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_CODES ||
599 $this->code_was_used
600 ) &&
601 !$this->registration_settings->passwordGenerationEnabled()
602 ) {
603 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered'));
604
605 $login_link = $this->ui_renderer->render(
606 $this->ui_factory->link()->standard(
607 $this->lng->txt('login_to_ilias'),
608 './login.php?cmd=force_login&lang=' . $this->userObj->getLanguage()
609 )
610 );
611 $tpl->setVariable('LOGIN_LINK', $login_link);
612 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_APPROVE) {
613 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_submitted'));
614 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
615 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('reg_confirmation_link_successful'));
616 } else {
617 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered_passw_gen'));
618 }
619 return $tpl;
620 }
621
622 protected function addLoginSectionToForm(): void
623 {
624 $field = new ilFormSectionHeaderGUI();
625 $field->setTitle($this->lng->txt('login_data'));
626 $this->form->addItem($field);
627
628 $login_input = new ilTextInputGUI($this->lng->txt('username'), 'username');
629 $login_input->setSize(255);
630 $login_input->setRequired(true);
631 $this->form->addItem($login_input);
632
633 if ($this->registration_settings->passwordGenerationEnabled()) {
634 $password_input = new ilNonEditableValueGUI($this->lng->txt('password'));
635 $password_input->setValue($this->lng->txt('reg_passwd_via_mail'));
636 $this->form->addItem($password_input);
637 return;
638 }
639
640 $password_input = new ilPasswordInputGUI($this->lng->txt('password'), 'password');
641 $password_input->setUseStripSlashes(false);
642 $password_input->setRequired(true);
644 $this->form->addItem($password_input);
645 }
646
647 protected function buildRolesInput(): ?ilFormPropertyGUI
648 {
649 if (!$this->registration_settings->roleSelectionEnabled()) {
650 return null;
651 }
652
653 $options = [];
654 foreach (ilObjRole::_lookupRegisterAllowed() as $role) {
655 $options[$role['id']] = $role['title'];
656 }
657
658 if ($options === []) {
659 return null;
660 }
661
662 if (count($options) === 1) {
663 $roles_input = new ilHiddenInputGUI('usr_roles');
664 $keys = array_keys($options);
665 $roles_input->setValue((string) array_shift($keys));
666 return $roles_input;
667 }
668
669 $options_with_empty_value = ['' => $this->lng->txt('please_choose')] + $options;
670 $roles_input = new ilSelectInputGUI($this->lng->txt('default_role'), 'usr_roles');
671 $roles_input->setOptions($options_with_empty_value);
672 $roles_input->setRequired(true);
673 return $roles_input;
674
675 }
676}
$duration
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
@phpstan-type PendingRegistrationRecord array{id: string, usr_id: int, reg_hash: string,...
error(string $a_errmsg)
@ilCtrl_Calls ilAccountRegistrationGUI:
ilRegistrationSettings $registration_settings
ilRecommendedContentManager $recommended_content_manager
Class ilAccountRegistrationMail.
const int AUTH_LOCAL
Error Handling & global info handling.
This class represents a property in a property form.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
language handling
static getLogger(string $a_component_id)
Get component logger.
This class represents a non editable value in a property form.
static _lookupRegisterAllowed()
get all roles that are activated in user registration
static _lookupAllowRegister(int $a_role_id)
check whether role is allowed in user registration or not
User class.
static _loginExists(string $a_login, int $a_user_id=0)
static _doesLoginnameExistInHistory(string $a_login)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
This class represents a password property in a property form.
This class represents a property form user interface.
Class ilRbacAdmin Core functions for role based access control.
class ilRbacReview Contains Review functions of core Rbac.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static useCode(string $code)
static getCodeRole(string $code)
static getCodeData(string $code)
static isValidRegistrationCode(string $a_code)
Class class.ilregistrationEmailRoleAssignments.
Class ilObjAuthSettingsGUI.
static isPasswordValidForUserContext(string $clear_text_password, $user, ?string &$error_language_variable=null)
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()
static generatePasswords(int $a_number)
Generate a number of passwords.
This class represents a selection list property in a property form.
ILIAS Setting Class.
static initStartUpTemplate( $a_tmpl, bool $a_show_back=false, bool $a_show_logout=false)
This method enriches the global template with some user interface elements (language selection,...
static printToGlobalTemplate($tpl)
This class represents a text property in a property form.
static isLogin(string $a_login)
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
const ANONYMOUS_USER_ID
Definition: constants.php:27
setVariable(string $variable, $value='')
Sets the given variable to the given value.
An entity that renders components to a string output.
Definition: Renderer.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilDBInterface.
static http()
Fetches the global http state from ILIAS.
form(?array $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54