ILIAS  release_8 Revision v8.24
class.ilAccountRegistrationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
29 protected bool $code_enabled = false;
30 protected bool $code_was_used;
33
34 protected ?ilPropertyFormGUI $form = null;
35
38 protected ilLanguage $lng;
40 protected ?ilObjUser $userObj = null;
47
49 protected \ILIAS\HTTP\Services $http;
50
51 public function __construct()
52 {
53 global $DIC;
54
55 $this->tpl = $DIC->ui()->mainTemplate();
56
57 $this->ctrl = $DIC->ctrl();
58 $this->ctrl->saveParameter($this, 'lang');
59 $this->lng = $DIC->language();
60 $this->lng->loadLanguageModule('registration');
61 $this->error = $DIC['ilErr'];
62 $this->settings = $DIC->settings();
63 $this->globalUser = $DIC->user();
64 $this->rbacreview = $DIC->rbac()->review();
65 $this->rbacadmin = $DIC->rbac()->admin();
66 $this->ui_factory = $DIC->ui()->factory();
67 $this->ui_renderer = $DIC->ui()->renderer();
68
69 $this->registration_settings = new ilRegistrationSettings();
70 $this->code_enabled = ($this->registration_settings->registrationCodeRequired() ||
71 $this->registration_settings->getAllowCodes());
72
73 $this->termsOfServiceEvaluation = $DIC['tos.document.evaluator'];
74 $this->recommended_content_manager = new ilRecommendedContentManager();
75
76 $this->http = $DIC->http();
77 $this->refinery = $DIC->refinery();
78 }
79
80 public function executeCommand(): void
81 {
82 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DISABLED) {
83 $this->error->raiseError($this->lng->txt('reg_disabled'), $this->error->FATAL);
84 }
85
86 $cmd = $this->ctrl->getCmd();
87 switch ($cmd) {
88 case 'saveForm':
89 $tpl = $this->$cmd();
90 break;
91 default:
92 $tpl = $this->displayForm();
93 }
94
95 $this->tpl->setPermanentLink('usr', null, 'registration');
97 }
98
100 {
101 $tpl = ilStartUpGUI::initStartUpTemplate(['tpl.usr_registration.html', 'Services/Registration'], true);
102 $tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
103
104 if (!$this->form) {
105 $this->initForm();
106 }
107 $tpl->setVariable('FORM', $this->form->getHTML());
108 return $tpl;
109 }
110
111 protected function initForm(): void
112 {
113 $this->globalUser->setLanguage($this->lng->getLangKey());
114 $this->globalUser->setId(ANONYMOUS_USER_ID);
115
116 // needed for multi-text-fields (interests)
118
119 $this->form = new ilPropertyFormGUI();
120 $this->form->setFormAction($this->ctrl->getFormAction($this));
121
122 // code handling
123 if ($this->code_enabled) {
124 $field = new ilFormSectionHeaderGUI();
125 $field->setTitle($this->lng->txt('registration_codes_type_reg'));
126 $this->form->addItem($field);
127 $code = new ilTextInputGUI($this->lng->txt("registration_code"), "usr_registration_code");
128 $code->setSize(40);
129 $code->setMaxLength(ilRegistrationCode::CODE_LENGTH);
130 if ($this->registration_settings->registrationCodeRequired()) {
131 $code->setRequired(true);
132 $code->setInfo($this->lng->txt("registration_code_required_info"));
133 } else {
134 $code->setInfo($this->lng->txt("registration_code_optional_info"));
135 }
136 $this->form->addItem($code);
137 }
138
139 // user defined fields
140 $user_defined_data = $this->globalUser->getUserDefinedData();
141 $user_defined_fields = ilUserDefinedFields::_getInstance();
142 $custom_fields = [];
143
144 foreach ($user_defined_fields->getRegistrationDefinitions() as $field_id => $definition) {
145 $fprop = ilCustomUserFieldsHelper::getInstance()->getFormPropertyForDefinition(
146 $definition,
147 true,
148 $user_defined_data['f_' . $field_id] ?? ''
149 );
150 if ($fprop instanceof ilFormPropertyGUI) {
151 $custom_fields['udf_' . $definition['field_id']] = $fprop;
152 }
153 }
154
155 // standard fields
156 //TODO-PHP8-REVIEW please check if there is a need for this static call. It looks like of odd to me, that
157 //we need a global static state variable in class that changes the behaviour of all instances.
158 $up = new ilUserProfile();
160 $up->skipGroup("preferences");
161
162 $up->setAjaxCallback(
163 $this->ctrl->getLinkTarget($this, 'doProfileAutoComplete', '', true)
164 );
165 $this->lng->loadLanguageModule("user");
166 // add fields to form
167 $up->addStandardFieldsToForm($this->form, null, $custom_fields);
168 unset($custom_fields);
169
170 // set language selection to current display language
171 $flang = $this->form->getItemByPostVar("usr_language");
172 if ($flang) {
173 $flang->setValue($this->lng->getLangKey());
174 }
175
176 // add information to role selection (if not hidden)
177 if ($this->code_enabled) {
178 $role = $this->form->getItemByPostVar("usr_roles");
179 if ($role && $role->getType() === "select") {
180 $role->setInfo($this->lng->txt("registration_code_role_info"));
181 }
182 }
183
184 // #11407
185 $domains = [];
186 foreach ($this->registration_settings->getAllowedDomains() as $item) {
187 if (trim($item)) {
188 $domains[] = $item;
189 }
190 }
191 if (count($domains)) {
192 $mail_obj = $this->form->getItemByPostVar('usr_email');
193 $mail_obj->setInfo(sprintf(
194 $this->lng->txt("reg_email_domains"),
195 implode(", ", $domains)
196 ) . "<br />" .
197 ($this->code_enabled ? $this->lng->txt("reg_email_domains_code") : ""));
198 }
199
200 // #14272
201 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
202 $mail_obj = $this->form->getItemByPostVar('usr_email');
203 if ($mail_obj) { // #16087
204 $mail_obj->setRequired(true);
205 }
206 }
207
208 if (ilTermsOfServiceHelper::isEnabled() && $this->termsOfServiceEvaluation->hasDocument()) {
209 $document = $this->termsOfServiceEvaluation->document();
210
211 $field = new ilFormSectionHeaderGUI();
212 $field->setTitle($this->lng->txt('usr_agreement'));
213 $this->form->addItem($field);
214
215 $field = new ilCustomInputGUI();
216 $field->setHtml('<div id="agreement">' . $document->content() . '</div>');
217 $this->form->addItem($field);
218
219 $field = new ilCheckboxInputGUI($this->lng->txt('accept_usr_agreement'), 'accept_terms_of_service');
220 $field->setRequired(true);
221 $field->setValue('1');
222 $this->form->addItem($field);
223 }
224
225 $this->form->addCommandButton("saveForm", $this->lng->txt("register"));
226 }
227
229 {
230 $this->initForm();
231 $form_valid = $this->form->checkInput();
232
233 // custom validation
234 $valid_code = $valid_role = false;
235
236 // code
237 if ($this->code_enabled) {
238 $code = $this->form->getInput('usr_registration_code');
239 // could be optional
240 if (
241 $code !== '' ||
242 $this->registration_settings->registrationCodeRequired()
243 ) {
244 // code validation
246 $code_obj = $this->form->getItemByPostVar('usr_registration_code');
247 $code_obj->setAlert($this->lng->txt('registration_code_not_valid'));
248 $form_valid = false;
249 } else {
250 $valid_code = true;
251
252 // get role from code, check if (still) valid
253 $role_id = ilRegistrationCode::getCodeRole($code);
254 if ($role_id && $this->rbacreview->isGlobalRole($role_id)) {
255 $valid_role = $role_id;
256 }
257 }
258 }
259 }
260
261 // valid codes override email domain check
262 if (!$valid_code) {
263 // validate email against restricted domains
264 $email = $this->form->getInput("usr_email");
265 if ($email) {
266 // #10366
267 $domains = [];
268 foreach ($this->registration_settings->getAllowedDomains() as $item) {
269 if (trim($item)) {
270 $domains[] = $item;
271 }
272 }
273 if (count($domains)) {
274 $mail_valid = false;
275 foreach ($domains as $domain) {
276 $domain = str_replace("*", "~~~", $domain);
277 $domain = preg_quote($domain, '/');
278 $domain = str_replace("~~~", ".+", $domain);
279 if (preg_match("/^" . $domain . "$/", $email, $hit)) {
280 $mail_valid = true;
281 break;
282 }
283 }
284 if (!$mail_valid) {
285 $mail_obj = $this->form->getItemByPostVar('usr_email');
286 $mail_obj->setAlert(sprintf(
287 $this->lng->txt("reg_email_domains"),
288 implode(", ", $domains)
289 ));
290 $form_valid = false;
291 }
292 }
293 }
294 }
295
296 $error_lng_var = '';
297 if (
298 !$this->registration_settings->passwordGenerationEnabled() &&
300 $this->form->getInput('usr_password'),
301 $this->form->getInput('username'),
302 $error_lng_var
303 )
304 ) {
305 $passwd_obj = $this->form->getItemByPostVar('usr_password');
306 $passwd_obj->setAlert($this->lng->txt($error_lng_var));
307 $form_valid = false;
308 }
309
310 $showGlobalTermsOfServieFailure = false;
311 if (ilTermsOfServiceHelper::isEnabled() && !$this->form->getInput('accept_terms_of_service')) {
312 $agr_obj = $this->form->getItemByPostVar('accept_terms_of_service');
313 if ($agr_obj) {
314 $agr_obj->setAlert($this->lng->txt('force_accept_usr_agreement'));
315 $form_valid = false;
316 } else {
317 $showGlobalTermsOfServieFailure = true;
318 }
319 }
320
321 // no need if role is attached to code
322 if (!$valid_role) {
323 // manual selection
324 if ($this->registration_settings->roleSelectionEnabled()) {
325 $selected_role = $this->form->getInput("usr_roles");
326 if ($selected_role && ilObjRole::_lookupAllowRegister((int) $selected_role)) {
327 $valid_role = (int) $selected_role;
328 }
329 } // assign by email
330 else {
331 $registration_role_assignments = new ilRegistrationRoleAssignments();
332 $valid_role = $registration_role_assignments->getRoleByEmail($this->form->getInput("usr_email"));
333 }
334 }
335
336 // no valid role could be determined
337 if (!$valid_role) {
338 $this->tpl->setOnScreenMessage('info', $this->lng->txt("registration_no_valid_role"));
339 $form_valid = false;
340 }
341
342 // validate username
343 $login_obj = $this->form->getItemByPostVar('username');
344 $login = $this->form->getInput("username");
345 if (!ilUtil::isLogin($login)) {
346 $login_obj->setAlert($this->lng->txt("login_invalid"));
347 $form_valid = false;
348 }
349
350 if ($form_valid) {
351 if (ilObjUser::_loginExists($login)) {
352 $login_obj->setAlert($this->lng->txt("login_exists"));
353 $form_valid = false;
354 } elseif ((int) $this->settings->get('allow_change_loginname') &&
355 (int) $this->settings->get('reuse_of_loginnames') === 0 &&
357 $login_obj->setAlert($this->lng->txt('login_exists'));
358 $form_valid = false;
359 }
360 }
361
362 if (!$form_valid) {
363 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
364 } elseif ($showGlobalTermsOfServieFailure) {
365 $this->lng->loadLanguageModule('tos');
366 $this->tpl->setOnScreenMessage('failure', sprintf(
367 $this->lng->txt('tos_account_reg_not_possible'),
369 ));
370 } else {
371 $password = $this->createUser($valid_role);
372 $this->distributeMails($password);
373 return $this->login();
374 }
375 $this->form->setValuesByPost();
376 return $this->displayForm();
377 }
378
379 protected function createUser(int $a_role): string
380 {
381 // something went wrong with the form validation
382 if (!$a_role) {
383 global $DIC;
384
385 $ilias = $DIC['ilias'];
386 $ilias->raiseError("Invalid role selection in registration" .
387 ", IP: " . $_SERVER["REMOTE_ADDR"], $ilias->error_obj->FATAL);
388 }
389
390 $this->userObj = new ilObjUser();
391
392 $up = new ilUserProfile();
394
395 $map = [];
396 $up->skipGroup("preferences");
397 $up->skipGroup("settings");
398 $up->skipField("password");
399 $up->skipField("birthday");
400 $up->skipField("upload");
401 foreach ($up->getStandardFields() as $k => $v) {
402 if ($v["method"]) {
403 $method = "set" . substr($v["method"], 3);
404 if (method_exists($this->userObj, $method)) {
405 if ($k !== "username") {
406 $k = "usr_" . $k;
407 }
408 $field_obj = $this->form->getItemByPostVar($k);
409 if ($field_obj) {
410 $this->userObj->$method($this->form->getInput($k));
411 }
412 }
413 }
414 }
415
416 $this->userObj->setFullName();
417
418 $birthday_obj = $this->form->getItemByPostVar("usr_birthday");
419 if ($birthday_obj) {
420 $birthday = $this->form->getInput("usr_birthday");
421 $this->userObj->setBirthday($birthday);
422 }
423
424 $this->userObj->setTitle($this->userObj->getFullname());
425 $this->userObj->setDescription($this->userObj->getEmail());
426
427 if ($this->registration_settings->passwordGenerationEnabled()) {
429 $password = $password[0];
430 } else {
431 $password = $this->form->getInput("usr_password");
432 }
433 $this->userObj->setPasswd($password);
434
435 // Set user defined data
436 $user_defined_fields = ilUserDefinedFields::_getInstance();
437 $defs = $user_defined_fields->getRegistrationDefinitions();
438 $udf = [];
439 foreach ($defs as $definition) {
440 $f = "udf_" . $definition['field_id'];
441 $item = $this->form->getItemByPostVar($f);
442 if ($item && !$item->getDisabled()) {
443 $udf[$definition['field_id']] = $this->form->getInput($f);
444 }
445 }
446 $this->userObj->setUserDefinedData($udf);
447
448 $this->userObj->setTimeLimitOwner(7);
449
450 $access_limit = null;
451
452 $this->code_was_used = false;
453 $code_has_access_limit = false;
454
456 $code_local_roles = [];
457 if ($this->code_enabled) {
458 $code_local_roles = $code_has_access_limit = null;
459
460 // #10853 - could be optional
461 $code = $this->form->getInput('usr_registration_code');
462 if ($code) {
463
464 // set code to used
466 $this->code_was_used = true;
467
468 // handle code attached local role(s) and access limitation
469 $code_data = ilRegistrationCode::getCodeData($code);
470 if (isset($code_data['role_local']) && is_string($code_data['role_local'])) {
471 // need user id before we can assign role(s)
472 $code_local_roles = array_filter(array_map(
473 static fn (string $value): int => (int) $value,
474 explode(';', $code_data['role_local'])
475 ));
476 }
477 if ($code_data["alimit"]) {
478 // see below
479 $code_has_access_limit = true;
480
481 switch ($code_data["alimit"]) {
482 case "absolute":
483 $abs = date_parse($code_data["alimitdt"]);
484 $access_limit = mktime(23, 59, 59, $abs['month'], $abs['day'], $abs['year']);
485 break;
486
487 case "relative":
488 $rel = unserialize($code_data["alimitdt"], ['allowed_classes' => false]);
489 $access_limit = (int) ($rel["d"] * 86400 + $rel["m"] * 2592000 + $rel["y"] * 31536000 + time());
490 break;
491 }
492 }
493 }
494 }
495
496 // code access limitation will override any other access limitation setting
497 if (!($this->code_was_used && $code_has_access_limit) &&
498 $this->registration_settings->getAccessLimitation()) {
499 $access_limitations_obj = new ilRegistrationRoleAccessLimitations();
500 switch ($access_limitations_obj->getMode($a_role)) {
501 case 'absolute':
502 $access_limit = $access_limitations_obj->getAbsolute($a_role);
503 break;
504
505 case 'relative':
506 $rel_d = $access_limitations_obj->getRelative($a_role, 'd');
507 $rel_m = $access_limitations_obj->getRelative($a_role, 'm');
508 $access_limit = $rel_d * 86400 + $rel_m * 2592000 + time();
509 break;
510 }
511 }
512
513 if ($access_limit) {
514 $this->userObj->setTimeLimitUnlimited(false);
515 $this->userObj->setTimeLimitUntil($access_limit);
516 } else {
517 $this->userObj->setTimeLimitUnlimited(true);
518 $this->userObj->setTimeLimitUntil(time());
519 }
520
521 $this->userObj->setTimeLimitFrom(time());
522
524
525 $this->userObj->create();
526
527 if ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DIRECT ||
528 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_CODES ||
529 $this->code_was_used) {
530 $this->userObj->setActive(true, 0);
531 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
532 $this->userObj->setActive(false, 0);
533 } else {
534 $this->userObj->setActive(false, 0);
535 }
536
537 // set a timestamp for last_password_change
538 // this ts is needed by ilSecuritySettings
539 $this->userObj->setLastPasswordChangeTS(time());
540
541 $this->userObj->setIsSelfRegistered(true);
542
543 //insert user data in table user_data
544 $this->userObj->saveAsNew();
545
546 // don't update owner before the first save. updateOwner rereads the object which fails if it not save before
547 $this->userObj->updateOwner();
548
549 // setup user preferences
550 $this->userObj->setLanguage($this->form->getInput('usr_language'));
551
552 $handleDocument = ilTermsOfServiceHelper::isEnabled() && $this->termsOfServiceEvaluation->hasDocument();
553 if ($handleDocument) {
554 $helper = new ilTermsOfServiceHelper();
555
556 $helper->trackAcceptance($this->userObj, $this->termsOfServiceEvaluation->document());
557 }
558
559 $hits_per_page = $this->settings->get("hits_per_page");
560 if ($hits_per_page < 10) {
561 $hits_per_page = 10;
562 }
563 $this->userObj->setPref("hits_per_page", $hits_per_page);
564 if ($this->http->wrapper()->query()->has('target')) {
565 $this->userObj->setPref(
566 'reg_target',
567 $this->http->wrapper()->query()->retrieve(
568 'target',
569 $this->refinery->kindlyTo()->string()
570 )
571 );
572 }
573 $this->userObj->setPref('bs_allow_to_contact_me', $this->settings->get('bs_allow_to_contact_me', 'n'));
574 $this->userObj->setPref('chat_osc_accept_msg', $this->settings->get('chat_osc_accept_msg', 'n'));
575 $this->userObj->setPref('chat_broadcast_typing', $this->settings->get('chat_broadcast_typing', 'n'));
576 $this->userObj->writePrefs();
577
578 $this->rbacadmin->assignUser($a_role, $this->userObj->getId());
579
580 // local roles from code
581 if ($this->code_was_used && is_array($code_local_roles)) {
582 foreach (array_unique($code_local_roles) as $local_role_obj_id) {
583 // is given role (still) valid?
584 if (ilObject::_lookupType($local_role_obj_id) === "role") {
585 $this->rbacadmin->assignUser($local_role_obj_id, $this->userObj->getId());
586
587 // patch to remove for 45 due to mantis 21953
588 $role_obj = $GLOBALS['DIC']['rbacreview']->getObjectOfRole($local_role_obj_id);
589 switch (ilObject::_lookupType($role_obj)) {
590 case 'crs':
591 case 'grp':
592 $role_refs = ilObject::_getAllReferences($role_obj);
593 $role_ref = end($role_refs);
594 // deactivated for now, see discussion at
595 // https://docu.ilias.de/goto_docu_wiki_wpage_5620_1357.html
596 // $this->recommended_content_manager->addObjectRecommendation($this->userObj->getId(), $role_ref);
597 break;
598 }
599 }
600 }
601 }
602
603 return (string) $password;
604 }
605
606 protected function distributeMails(string $password): void
607 {
608 // Send mail to approvers, if they are defined
609 if ($this->registration_settings->getApproveRecipients()) {
610 $mail = new ilRegistrationMailNotification();
611
612 if (!$this->code_was_used &&
613 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_APPROVE) {
615 } else {
617 }
618 $mail->setRecipients($this->registration_settings->getApproveRecipients());
619 $mail->setAdditionalInformation(['usr' => $this->userObj]);
620 $mail->send();
621 }
622 // Send mail to new user
623 // Registration with confirmation link ist enabled
624 if (!$this->code_was_used &&
625 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
628 $mail->setRecipients([$this->userObj]);
629 $mail->setAdditionalInformation(
630 [
631 'usr' => $this->userObj,
632 'hash_lifetime' => $this->registration_settings->getRegistrationHashLifetime()
633 ]
634 );
635 $mail->send();
636 } else {
637 $accountMail = new ilAccountRegistrationMail(
638 $this->registration_settings,
639 $this->lng,
641 );
642 $accountMail->withDirectRegistrationMode()->send($this->userObj, $password, $this->code_was_used);
643 }
644 }
645
647 {
648 $tpl = ilStartUpGUI::initStartUpTemplate(['tpl.usr_registered.html', 'Services/Registration'], false);
649 $this->tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
650
651 $tpl->setVariable("TXT_WELCOME", $this->lng->txt("welcome") . ", " . $this->userObj->getTitle() . "!");
652 if (
653 (
654 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_DIRECT ||
655 $this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_CODES ||
656 $this->code_was_used
657 ) &&
658 !$this->registration_settings->passwordGenerationEnabled()
659 ) {
660 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered'));
661
662 $login_link = $this->ui_renderer->render(
663 $this->ui_factory->link()->standard(
664 $this->lng->txt('login_to_ilias'),
665 './login.php?cmd=force_login&lang=' . $this->userObj->getLanguage()
666 )
667 );
668 $tpl->setVariable('LOGIN_LINK', $login_link);
669 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_APPROVE) {
670 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_submitted'));
671 } elseif ($this->registration_settings->getRegistrationType() === ilRegistrationSettings::IL_REG_ACTIVATION) {
672 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('reg_confirmation_link_successful'));
673 } else {
674 $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered_passw_gen'));
675 }
676 return $tpl;
677 }
678
679 protected function doProfileAutoComplete(): void
680 {
681 $field_id = (string) $_REQUEST["f"];
682 $term = (string) $_REQUEST["term"];
683
684 $result = ilPublicUserProfileGUI::getAutocompleteResult($field_id, $term);
685 if (count($result)) {
686 echo json_encode($result, JSON_THROW_ON_ERROR);
687 }
688
689 exit();
690 }
691}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Builds data types.
Definition: Factory.php:21
error(string $a_errmsg)
Class ilAccountRegistrationGUI.
ilRegistrationSettings $registration_settings
ilRecommendedContentManager $recommended_content_manager
ilTermsOfServiceDocumentEvaluation $termsOfServiceEvaluation
Class ilAccountRegistrationMail.
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Error Handling & global info handling uses PEAR error class.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
static prepareFormOutput($a_str, bool $a_strip=false)
static getLogger(string $a_component_id)
Get component logger.
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)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static _doesLoginnameExistInHistory(string $a_login)
Checks whether the passed loginname already exists in history.
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
This class represents a property form user interface.
static getAutocompleteResult(string $a_field_id, string $a_term)
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 generatePasswords(int $a_number)
Generate a number of passwords.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static printToGlobalTemplate($tpl)
static getMailsToAddress()
Get mailto: emails.
Class ilTermsOfServiceHelper.
This class represents a text property in a property form.
Class ilUserProfile.
static setMode(int $mode)
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
global $DIC
Definition: feed.php:28
This is how the factory for UI elements looks.
Definition: Factory.php:38
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVariable(string $variable, $value='')
Sets the given variable to the given value.
Interface ilTermsOfServiceDocumentEvaluation.
exit
Definition: login.php:28
if( $orgName !==null) if($spconfig->hasValue('contacts')) $email
Definition: metadata.php:302
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd)
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10