ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilUserProfile.php
Go to the documentation of this file.
1 <?php
2 
20 
26 {
27  public const MODE_DESKTOP = 1;
28  public const MODE_REGISTRATION = 2;
29 
30  private int $mode = self::MODE_DESKTOP;
31 
33  private ilLanguage $lng;
35 
36  private array $user_fields;
37  protected string $ajax_href;
38  protected array $skip_fields; // Missing array type.
39  protected array $skip_groups; // Missing array type.
40 
42 
43  public function __construct()
44  {
46  global $DIC;
47  $this->settings = $DIC['ilSetting'];
48  $this->lng = $DIC['lng'];
49  $this->rbac_review = $DIC['rbacreview'];
50 
51  $this->user_fields = (new ilUserProfileDefaultFields())->getDefaultProfileFields();
52  $this->user_settings_config = new ilUserSettingsConfig();
53 
54  $this->skip_groups = [];
55  $this->skip_fields = [];
56 
57  $this->lng->loadLanguageModule('awrn');
58  $this->lng->loadLanguageModule('buddysystem');
59  }
60 
61  public function getStandardFields(): array // Missing array type.
62  {
63  $fields = [];
64  foreach ($this->user_fields as $f => $p) {
65  // skip hidden groups
66  if (in_array($p['group'], $this->skip_groups) ||
67  in_array($f, $this->skip_fields)) {
68  continue;
69  }
70  $fields[$f] = $p;
71  }
72  return $fields;
73  }
74 
75  public function getLocalUserAdministrationFields(): array // Missing array type.
76  {
77  $fields = [];
78  foreach ($this->getStandardFields() as $field => $info) {
79  if ($this->settings->get('usr_settings_visib_lua_' . $field, '1')) {
80  $fields[$field] = $info;
81  } elseif ($info['visib_lua_fix_value'] ?? false) {
82  $fields[$field] = $info;
83  }
84  }
85  return $fields;
86  }
87 
88  public function skipGroup(string $group): void
89  {
90  $this->skip_groups[] = $group;
91  }
92 
93  public function skipField(string $field): void
94  {
95  $this->skip_fields[] = $field;
96  }
97 
98  public function addStandardFieldsToForm(
99  ilPropertyFormGUI $form,
100  ?ilObjUser $user = null,
101  array $custom_fields = []
102  ): void {
103  $registration_settings = null;
104  if ($this->mode == self::MODE_REGISTRATION) {
105  $registration_settings = new ilRegistrationSettings();
107  }
108 
109  $current_group = '';
110  $custom_fields_done = false;
111  foreach ($this->getStandardFields() as $field_id => $field_definition) {
112  // next group? -> diplay subheader
113  if (($field_definition['group'] !== $current_group) &&
114  $this->userSettingVisible($field_id)) {
115  list($form, $current_group, $custom_fields_done) = $this->handleSectionChange(
116  $form,
117  $current_group,
118  $field_definition['group'],
119  $custom_fields,
120  $custom_fields_done
121  );
122  }
123  $form = $this->addFieldToForm(
124  $field_id,
125  $field_definition,
126  $user,
127  $form,
128  $registration_settings
129  );
130  }
131 
132  // append custom fields as 'other'
133  if ($custom_fields !== [] && !$custom_fields_done) {
134  $form = $this->addCustomFieldsToForm(
135  $form,
136  $custom_fields,
137  $current_group
138  );
139  }
140  }
141 
142  private function addRegistrationFieldsToFieldArray(): void
143  {
144  $this->user_fields['username']['group'] = 'login_data';
145  $this->user_fields['password']['group'] = 'login_data';
146  $this->user_fields['language']['default'] = $this->lng->lang_key;
147 
148  // different position for role
149  $roles = $this->user_fields['roles'];
150  unset($this->user_fields['roles']);
151  $this->user_fields['roles'] = $roles;
152  $this->user_fields['roles']['group'] = 'settings';
153  }
154 
155  private function handleSectionChange(
156  ilPropertyFormGUI $form,
157  string $current_group,
158  string $next_group,
159  array $custom_fields,
160  bool $custom_fields_done
161  ): array {
162  if ($custom_fields !== [] && !$custom_fields_done
163  && ($current_group === 'other' || $next_group === 'settings')) {
164  // add 'other' subheader
165  $form = $this->addCustomFieldsToForm(
166  $form,
167  $custom_fields,
168  $current_group
169  );
170  $custom_fields_done = true;
171  }
172 
173  $section_header = new ilFormSectionHeaderGUI();
174  $section_header->setTitle($this->lng->txt($next_group));
175  $form->addItem($section_header);
176  return [
177  $form,
178  $next_group,
179  $custom_fields_done
180  ];
181  }
182 
183  private function addFieldToForm(
184  string $field_id,
185  array $field_definition,
186  ?ilObjUser $user,
187  ilPropertyFormGUI $form,
188  ?ilRegistrationSettings $registration_settings
189  ): ilPropertyFormGUI {
190  $method = $field_definition['method'] ?? '';
191 
192  $lang_var = (isset($field_definition['lang_var']) && $field_definition['lang_var'] !== '')
193  ? $field_definition['lang_var']
194  : $field_id;
195 
196  switch ($field_definition['input']) {
197  case 'text':
198  if (!$this->userSettingVisible($field_id)) {
199  break;
200  }
201 
202  $form->addItem(
203  $this->getTextInput(
204  $field_id,
205  $field_definition,
206  $method,
207  $lang_var,
208  $user
209  )
210  );
211  break;
212 
213  case 'textarea':
214  if (!$this->userSettingVisible($field_id)) {
215  break;
216  }
217 
218  $form->addItem(
219  $this->getTextareaInput(
220  $field_id,
221  $field_definition,
222  $method,
223  $lang_var,
224  $user
225  )
226  );
227  break;
228 
229  case 'multitext':
230  if (!$this->userSettingVisible($field_id)) {
231  break;
232  }
233 
234  $form->addItem(
235  $this->getMultitextInput(
236  $field_id,
237  $field_definition,
238  $method,
239  $lang_var,
240  $user
241  )
242  );
243  break;
244 
245  case 'radio':
246  if (!$this->userSettingVisible($field_id)) {
247  break;
248  }
249 
250  $form->addItem(
251  $this->getRadioInput(
252  $field_id,
253  $field_definition,
254  $method,
255  $lang_var,
256  $user
257  )
258  );
259  break;
260 
261  case 'login':
262  $form->addItem(
263  $this->getLoginInput($field_definition, $user)
264  );
265  break;
266 
267  case 'sel_country':
268  if (!$this->userSettingVisible($field_id)) {
269  break;
270  }
271 
272  $form->addItem(
273  $this->getCountryInput($field_id, $method, $lang_var, $user)
274  );
275  break;
276 
277  case 'birthday':
278  if (!$this->userSettingVisible($field_id)) {
279  break;
280  }
281 
282  $form->addItem(
283  $this->getBirthdayInput($field_id, $method, $lang_var, $user)
284  );
285  break;
286 
287  case 'picture':
288  if (!$this->userSettingVisible($field_id) || $user === null) {
289  break;
290  }
291 
292  $form->addItem(
293  $this->getImageInput($form->getFileUpload('userfile'), $user)
294  );
295  break;
296 
297  case 'roles':
298  $roles_input = $this->getRolesInput($field_id, $registration_settings, $user);
299  if ($roles_input !== null) {
300  $form->addItem($roles_input);
301  }
302  break;
303 
304  case 'second_email':
305  case 'email':
306  if (!$this->userSettingVisible($field_id)) {
307  break;
308  }
309 
310  $form->addItem(
311  $this->getEmailInput($field_id, $method, $lang_var, $user)
312  );
313  break;
314 
315  case 'password':
316  if ($this->mode !== self::MODE_REGISTRATION) {
317  break;
318  }
319 
320  $form->addItem(
321  $this->getPasswordInput(
322  $field_id,
323  $lang_var,
324  $registration_settings
325  )
326  );
327  break;
328 
329  case 'language':
330  if (!$this->userSettingVisible($field_id)) {
331  break;
332  }
333 
334  $form->addItem(
335  $this->getLanguageInput(
336  $field_id,
337  $method,
338  $lang_var,
339  $user
340  )
341  );
342  break;
343 
344  case 'noneditable':
345  if ($this->mode !== self::MODE_DESKTOP || !$this->userSettingVisible($field_id)) {
346  break;
347  }
348 
349  $form->addItem(
350  $this->getNonEditableInput($method, $lang_var, $user)
351  );
352  break;
353  }
354 
355  return $form;
356  }
357 
358  private function getTextInput(
359  string $field_id,
360  array $field_definition,
361  string $method,
362  string $lang_var,
363  ?ilObjUser $user
364  ): ilFormPropertyGUI {
365  $text_input = new ilTextInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
366  $text_input->setValue('');
367  if ($user !== null) {
368  $text_input->setValue($user->$method() ?? '');
369  }
370  $text_input->setMaxLength($field_definition['maxlength']);
371  $text_input->setSize($field_definition['size']);
372  $text_input->setRequired((bool) $this->settings->get('require_' . $field_id));
373  if (!$text_input->getRequired() || $text_input->getValue()) {
374  $text_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
375  }
376 
377  return $text_input;
378  }
379 
380  private function getTextareaInput(
381  string $field_id,
382  array $field_definition,
383  string $method,
384  string $lang_var,
385  ?ilObjUser $user
386  ): ilFormPropertyGUI {
387  $text_area = new ilTextAreaInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
388  if ($user !== null) {
389  $text_area->setValue($user->$method() ?? '');
390  }
391  $text_area->setRows($field_definition['rows']);
392  $text_area->setCols($field_definition['cols']);
393  $text_area->setRequired((bool) $this->settings->get('require_' . $field_id));
394  if (!$text_area->getRequired() || $text_area->getValue()) {
395  $text_area->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
396  }
397  return $text_area;
398  }
399 
400  private function getMultitextInput(
401  string $field_id,
402  array $field_definition,
403  string $method,
404  string $lang_var,
405  ?ilObjUser $user
406  ): ilFormPropertyGUI {
407  $multi_text_input = new ilTextInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
408  $multi_text_input->setMulti(true);
409  if ($user !== null) {
410  $multi_text_input->setValue($user->$method());
411  }
412  $multi_text_input->setMaxLength($field_definition['maxlength']);
413  $multi_text_input->setSize($field_definition['size']);
414  $multi_text_input->setRequired((bool) $this->settings->get('require_' . $field_id));
415  if (!$multi_text_input->getRequired() || $multi_text_input->getValue()) {
416  $multi_text_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
417  }
418  if ($this->ajax_href) {
419  // add field to ajax call
420  $multi_text_input->setDataSource($this->ajax_href . '&f=' . $field_id);
421  }
422  return $multi_text_input;
423  }
424 
425  private function getRadioInput(
426  string $field_id,
427  array $field_definition,
428  string $method,
429  string $lang_var,
430  ?ilObjUser $user
431  ): ilFormPropertyGUI {
432  $radio_group = new ilRadioGroupInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
433  if ($user) {
434  $radio_group->setValue($user->$method());
435  }
436  foreach ($field_definition['values'] as $k => $v) {
437  $op = new ilRadioOption($this->lng->txt($v), $k);
438  $radio_group->addOption($op);
439  }
440  $radio_group->setRequired((bool) $this->settings->get('require_' . $field_id));
441  if (!$radio_group->getRequired() || $radio_group->getValue()) {
442  $radio_group->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
443  }
444  return $radio_group;
445  }
446 
447  private function getLoginInput(
448  array $field_definition,
449  ?ilObjUser $user
450  ): ilFormPropertyGUI {
451  $login_input = new ilNonEditableValueGUI($this->lng->txt('username'), 'ne_un');
452 
453  if ((int) $this->settings->get('allow_change_loginname') || $this->mode == self::MODE_REGISTRATION) {
454  $login_input = new ilTextInputGUI($this->lng->txt('username'), 'username');
455  $login_input->setMaxLength((int) $field_definition['maxlength']);
456  $login_input->setSize(255);
457  $login_input->setRequired(true);
458  }
459 
460  if ($user !== null) {
461  $login_input->setValue($user->getLogin());
462  }
463  return $login_input;
464  }
465 
466  private function getCountryInput(
467  string $field_id,
468  string $method,
469  string $lang_var,
470  ?ilObjUser $user
471  ): ilFormPropertyGUI {
472  $country_input = new ilCountrySelectInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
473  if ($user) {
474  $country_input->setValue($user->$method());
475  }
476  $country_input->setRequired((bool) $this->settings->get('require_' . $field_id));
477  if (!$country_input->getRequired() || $country_input->getValue()) {
478  $country_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
479  }
480  return $country_input;
481  }
482 
483  private function getBirthdayInput(
484  string $field_id,
485  string $method,
486  string $lang_var,
487  ?ilObjUser $user
488  ): ilFormPropertyGUI {
489  $birthday_input = new ilBirthdayInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
490  $date = null;
491  if ($user && $user->$method() && strlen($user->$method())) {
492  $date = new ilDateTime($user->$method(), IL_CAL_DATE);
493  $birthday_input->setDate($date);
494  }
495  $birthday_input->setRequired((bool) $this->settings->get('require_' . $field_id));
496  if (!$birthday_input->getRequired() || $date !== null) {
497  $birthday_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
498  }
499  return $birthday_input;
500  }
501 
502  private function getImageInput(
503  array $file_upload,
504  ?ilObjUser $user
505  ): ilFormPropertyGUI {
506  $image_input = new ilImageFileInputGUI($this->lng->txt('personal_picture'), 'userfile');
507  $image_input->setAllowCapture(true);
508  $image_input->setDisabled((bool) $this->settings->get('usr_settings_disable_upload'));
509 
510  if ($file_upload['name'] ?? false) {
511  $image_input->setPending($file_upload['name']);
512  } else {
513  $picture_path = ilObjUser::_getPersonalPicturePath(
514  $user->getId(),
515  'small',
516  true,
517  true
518  );
519  if ($picture_path !== '') {
520  $image_input->setImage($picture_path);
521  $image_input->setAlt($this->lng->txt('personal_picture'));
522  }
523  }
524  return $image_input;
525  }
526 
527  private function getRolesInput(
528  string $field_id,
529  ?ilRegistrationSettings $registration_settings,
530  ?ilObjUser $user
531  ): ?ilFormPropertyGUI {
532  $role_names = '';
533  if ($this->mode === self::MODE_DESKTOP
534  && $this->userSettingVisible('roles')) {
535  $global_roles = $this->rbac_review->getGlobalRoles();
536  foreach ($global_roles as $role_id) {
537  if (in_array($role_id, $this->rbac_review->assignedRoles($user->getId()))) {
538  $role_obj = ilObjectFactory::getInstanceByObjId($role_id);
539  $role_names .= $role_obj->getTitle() . ', ';
540  unset($role_obj);
541  }
542  }
543  $roles_input = new ilNonEditableValueGUI($this->lng->txt('default_roles'), 'ne_dr');
544  $roles_input->setValue(substr($role_names, 0, -2));
545  return $roles_input;
546  }
547 
548  if ($this->mode === self::MODE_REGISTRATION
549  && $registration_settings->roleSelectionEnabled()) {
550  $options = [];
551  foreach (ilObjRole::_lookupRegisterAllowed() as $role) {
552  $options[$role['id']] = $role['title'];
553  }
554 
555  if ($options === []) {
556  return null;
557  }
558 
559  if (count($options) === 1) {
560  $roles_input = new ilHiddenInputGUI('usr_' . $field_id);
561  $keys = array_keys($options);
562  $roles_input->setValue(array_shift($keys));
563  return $roles_input;
564  }
565 
566  $options_with_empty_value = ['' => $this->lng->txt('please_choose')] + $options;
567  $roles_input = new ilSelectInputGUI($this->lng->txt('default_role'), 'usr_' . $field_id);
568  $roles_input->setOptions($options_with_empty_value);
569  $roles_input->setRequired(true);
570  if (!$roles_input->getRequired()) {
571  $roles_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
572  }
573  return $roles_input;
574  }
575 
576  return null;
577  }
578 
579  private function getEmailInput(
580  string $field_id,
581  string $method,
582  string $lang_var,
583  ?ilObjUser $user
584  ): ilFormPropertyGUI {
585  $email_input = new ilEMailInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
586  if ($user) {
587  $email_input->setValue($user->$method());
588  }
589  $email_input->setRequired((bool) $this->settings->get('require_' . $field_id));
590  if (!$email_input->getRequired() || $email_input->getValue()) {
591  $email_input->setDisabled((bool) $this->settings->get('usr_settings_disable_' . $field_id));
592  }
593  if (self::MODE_REGISTRATION == $this->mode) {
594  $email_input->setRetype(true);
595  }
596  return $email_input;
597  }
598 
599  private function getPasswordInput(
600  string $field_id,
601  string $lang_var,
602  ilRegistrationSettings $registration_settings
603  ): ilFormPropertyGUI {
604  if ($registration_settings->passwordGenerationEnabled()) {
605  $password_input = new ilNonEditableValueGUI($this->lng->txt($lang_var));
606  $password_input->setValue($this->lng->txt('reg_passwd_via_mail'));
607  return $password_input;
608  }
609 
610  $password_input = new ilPasswordInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
611  $password_input->setUseStripSlashes(false);
612  $password_input->setRequired(true);
613  $password_input->setInfo(ilSecuritySettingsChecker::getPasswordRequirementsInfo());
614  return $password_input;
615  }
616 
617  private function getLanguageInput(
618  string $field_id,
619  string $method,
620  string $lang_var,
621  ?ilObjUser $user
622  ): ilFormPropertyGUI {
623  $options = [];
624  $this->lng->loadLanguageModule('meta');
625  foreach ($this->lng->getInstalledLanguages() as $lang_key) {
626  $options[$lang_key] = $this->lng->txt('meta_l_' . $lang_key);
627  }
628 
629  asort($options);
630  $language_input = new ilSelectInputGUI($this->lng->txt($lang_var), 'usr_' . $field_id);
631  if ($user !== null) {
632  $language_input->setValue($user->$method());
633  }
634 
635  $language_input->setOptions($options);
636  $language_input->setRequired((bool) $this->settings->get('require_' . $field_id));
637  if (!$language_input->getRequired() || $language_input->getValue()) {
638  $language_input->setDisabled(
639  $this->settings->get('usr_settings_disable_' . $field_id) === '1'
640  || count($options) <= 1
641  );
642  }
643  return $language_input;
644  }
645 
646  private function getNonEditableInput(
647  string $method,
648  string $lang_var,
649  ilObjUser $user
650  ): ilFormPropertyGUI {
651  $non_editable_input = new ilNonEditableValueGUI($this->lng->txt($lang_var));
652  $non_editable_input->setValue($user->$method());
653  return $non_editable_input;
654  }
655 
656  private function addCustomFieldsToForm(
657  ilPropertyFormGUI $form,
658  array $custom_fields,
659  string $current_group
660  ): ilPropertyFormGUI {
661  if ($current_group !== 'other') {
662  $section_header = new ilFormSectionHeaderGUI();
663  $section_header->setTitle($this->lng->txt('other'));
664  $form->addItem($section_header);
665  }
666  foreach ($custom_fields as $custom_field) {
667  $form->addItem($custom_field);
668  }
669  return $form;
670  }
671 
672  public function setAjaxCallback(string $href): void
673  {
674  $this->ajax_href = $href;
675  }
676 
677  public function userSettingVisible(string $setting): bool
678  {
679  if ($this->mode === self::MODE_DESKTOP) {
680  return ($this->user_settings_config->isVisible($setting));
681  }
682 
683  if (isset($this->user_fields[$setting]['visib_reg_hide'])
684  && $this->user_fields[$setting]['visib_reg_hide'] === true) {
685  return true;
686  }
687 
688  return ($this->settings->get('usr_settings_visib_reg_' . $setting, '1')
689  || $this->settings->get('require_' . $setting, '0'));
690  }
691 
692  public function setMode(int $mode): bool
693  {
694  if (in_array($mode, [self::MODE_DESKTOP, self::MODE_REGISTRATION])) {
695  $this->mode = $mode;
696  return true;
697  }
698  return false;
699  }
700 
701  public function isProfileIncomplete(
702  ilObjUser $user,
703  bool $include_udf = true,
704  bool $personal_data_only = true
705  ): bool {
706  // standard fields
707  foreach ($this->user_fields as $field => $definition) {
708  // only if visible in personal data
709  if ($personal_data_only && !$this->user_settings_config->isVisible($field)) {
710  continue;
711  }
712 
713  if ($this->settings->get('require_' . $field) && $definition['method']
714  && empty($user->{$definition['method']}())) {
715  return true;
716  }
717  }
718 
719  // custom fields
720  if (!$include_udf) {
721  return false;
722  }
723 
724  $user_defined_data = $user->getUserDefinedData();
725  $user_defined_fields = ilUserDefinedFields::_getInstance();
726  foreach ($user_defined_fields->getRequiredDefinitions() as $field => $definition) {
727  // only if visible in personal data
728  if ($personal_data_only && !$definition['visible']) {
729  continue;
730  }
731 
732  if (!($user_defined_data['f_' . $field] ?? false)) {
733  ilLoggerFactory::getLogger('user')->info('Profile is incomplete due to missing required udf.');
734  return true;
735  }
736  }
737 
738  return false;
739  }
740 
741  protected function isEditableByUser(string $setting): bool
742  {
743  return $this->user_settings_config->isVisibleAndChangeable($setting);
744  }
745 
746  public function getIgnorableRequiredSettings(): array // Missing array type.
747  {
748  $ignorableSettings = [];
749 
750  foreach (array_keys($this->user_fields) as $field) {
751  // !!!username and password must not be ignored!!!
752  if ('username' == $field ||
753  'password' == $field) {
754  continue;
755  }
756 
757  // Field is not required -> continue
758  if (!$this->settings->get('require_' . $field)) {
759  continue;
760  }
761 
762  if ($this->isEditableByUser($field)) {
763  $ignorableSettings[] = $field;
764  }
765  }
766 
767  return $ignorableSettings;
768  }
769 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setAjaxCallback(string $href)
addCustomFieldsToForm(ilPropertyFormGUI $form, array $custom_fields, string $current_group)
static getLogger(string $a_component_id)
Get component logger.
This class represents a selection list property in a property form.
static _lookupRegisterAllowed()
get all roles that are activated in user registration
skipGroup(string $group)
setDisabled(bool $a_disabled)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
userSettingVisible(string $setting)
getRolesInput(string $field_id, ?ilRegistrationSettings $registration_settings, ?ilObjUser $user)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilUserProfile.
getTextareaInput(string $field_id, array $field_definition, string $method, string $lang_var, ?ilObjUser $user)
addStandardFieldsToForm(ilPropertyFormGUI $form, ?ilObjUser $user=null, array $custom_fields=[])
skipField(string $field)
getMultitextInput(string $field_id, array $field_definition, string $method, string $lang_var, ?ilObjUser $user)
setValue(string $a_value)
setOptions(array $a_options)
getBirthdayInput(string $field_id, string $method, string $lang_var, ?ilObjUser $user)
handleSectionChange(ilPropertyFormGUI $form, string $current_group, string $next_group, array $custom_fields, bool $custom_fields_done)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
ilRbacReview $rbac_review
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addFieldToForm(string $field_id, array $field_definition, ?ilObjUser $user, ilPropertyFormGUI $form, ?ilRegistrationSettings $registration_settings)
This class represents a property in a property form.
__construct(VocabulariesInterface $vocabularies)
setValue($a_value)
Set Value.
getLoginInput(array $field_definition, ?ilObjUser $user)
getTextInput(string $field_id, array $field_definition, string $method, string $lang_var, ?ilObjUser $user)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setUseStripSlashes(bool $a_stat)
En/disable use of stripslashes.
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()
getNonEditableInput(string $method, string $lang_var, ilObjUser $user)
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getFileUpload(string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
Get file upload data.
Class ilObjAuthSettingsGUI.
This class represents an image file property in a property form.
ilUserSettingsConfig $user_settings_config
const IL_CAL_DATE
isProfileIncomplete(ilObjUser $user, bool $include_udf=true, bool $personal_data_only=true)
getPasswordInput(string $field_id, string $lang_var, ilRegistrationSettings $registration_settings)
This class represents a text area property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRadioInput(string $field_id, array $field_definition, string $method, string $lang_var, ?ilObjUser $user)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCountryInput(string $field_id, string $method, string $lang_var, ?ilObjUser $user)
getEmailInput(string $field_id, string $method, string $lang_var, ?ilObjUser $user)
getLanguageInput(string $field_id, string $method, string $lang_var, ?ilObjUser $user)
isEditableByUser(string $setting)
getImageInput(array $file_upload, ?ilObjUser $user)