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