19 declare(strict_types=1);
45 'visible' =>
'user_visible_in_profile',
46 'changeable' =>
'changeable',
47 'searchable' =>
'header_searchable',
48 'required' =>
'required_field',
50 'course_export' =>
'course_export',
51 'group_export' =>
'group_export',
52 'prg_export' =>
'prg_export',
53 'visib_reg' =>
'header_visible_registration',
54 'visib_lua' =>
'usr_settings_visib_lua',
55 'changeable_lua' =>
'usr_settings_changeable_lua' 82 bool $a_call_by_reference
87 $this->
event = $DIC[
'ilAppEventHandler'];
88 $this->
filesystem = $DIC->filesystem()->storage();
89 $this->
upload = $DIC[
'upload'];
90 $this->db = $DIC[
'ilDB'];
101 $this->
lng->loadLanguageModule(
'search');
102 $this->
lng->loadLanguageModule(
'user');
103 $this->
lng->loadLanguageModule(
'tos');
104 $this->
ctrl->saveParameter(
118 $this->requested_ids = $this->user_request->getIds();
125 $translation = (!isset($properties[
'lang_var']) || $properties[
'lang_var'] ===
'')
127 : $properties[
'lang_var'];
129 if ($field_name ===
'country') {
130 $translation =
'country_free_text';
132 if ($field_name ===
'sel_country') {
133 $translation =
'country_selection';
136 return $this->
lng->txt($translation);
141 $this->user_owner_id = $a_id;
151 $next_class = $this->
ctrl->getNextClass($this);
152 $cmd = $this->
ctrl->getCmd();
155 switch ($next_class) {
156 case 'ilusertablegui':
161 $u_table->initFilter();
162 $this->
ctrl->setReturn(
166 $this->
ctrl->forwardCommand($u_table);
169 case 'ilpermissiongui':
171 $this->
ctrl->forwardCommand($perm_gui);
174 case 'ilrepositorysearchgui':
175 if (!$this->
access->checkRbacOrPositionPermissionAccess(
180 $this->
ilias->raiseError(
181 $this->
lng->txt(
'permission_denied'),
182 $this->
ilias->error_obj->MESSAGE
187 $user_search->setTitle($this->
lng->txt(
'search_user_extended'));
188 $user_search->enableSearchableCheck(
false);
189 $user_search->setUserLimitations(
false);
190 $user_search->setCallback(
192 'searchResultHandler',
195 $user_search->addUserAccessFilterCallable([$this,
'searchUserAccessFilterCallable']);
196 $this->tabs_gui->setTabActive(
'search_user_extended');
197 $this->
ctrl->setReturn(
201 $this->
ctrl->forwardCommand($user_search);
204 case 'ilcustomuserfieldsgui':
206 $this->tabs_gui->setTabActive(
'settings');
208 $this->tabs_gui->activateSubTab(
'user_defined_fields');
210 $this->requested_ref_id,
211 $this->user_request->getFieldId()
213 $this->
ctrl->forwardCommand($cf);
216 case 'iluserstartingpointgui':
218 $this->tabs_gui->setTabActive(
'settings');
220 $this->tabs_gui->activateSubTab(
'starting_points');
222 $this->
ctrl->forwardCommand($cf);
225 case strtolower(SettingsGUI::class):
227 $this->tabs_gui->setTabActive(
'settings');
229 $this->tabs_gui->activateSubTab(
'user_profile_info');
230 $this->
ctrl->forwardCommand(
239 new PromptRepository(
264 $utab->resetOffset();
265 $utab->resetFilter();
274 $this->
ctrl->setParameterByClass(
279 $this->
ctrl->redirectByClass(
280 [
'iladministrationgui',
'ilobjusergui'],
291 $utab->resetOffset();
292 $utab->writeFilterToSession();
294 $this->tabs_gui->activateTab(
'usrf');
302 if ($this->rbac_system->checkAccess(
'create_usr', $this->object->getRefId())
303 || $this->rbac_system->checkAccess(
'cat_administrate_users', $this->object->getRefId())) {
305 $this->ui_factory->link()->standard(
306 $this->
lng->txt(
'usr_add'),
307 $this->
ctrl->getLinkTarget($this,
'addUser')
312 $this->ui_factory->link()->standard(
313 $this->
lng->txt(
'import_users'),
314 $this->
ctrl->getLinkTarget($this,
'importUserForm')
319 $list_of_users =
null;
321 && $this->
access->checkRbacOrPositionPermissionAccess(
326 $list_of_users = $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
340 $utab->addFilterItemValue(
346 $this->tpl->setContent($utab->getHTML());
352 $auto->addUserAccessFilterCallable(\Closure::fromCallable([$this,
'filterUserIdsByRbacOrPositionOfCurrentUser']));
353 $auto->setSearchFields([
'login',
'firstname',
'lastname',
'email',
'second_email']);
354 $auto->enableFieldSearchableCheck(
false);
355 $auto->setMoreLinkAvailable(
true);
357 if ($this->user_request->getFetchAll()) {
361 echo $auto->getList($this->user_request->getTerm());
370 return $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
380 $this->
ctrl->redirect(
394 $d = $this->obj_definition->getCreatableSubObjects($this->
object->getType());
396 if (!$this->rbac_system->checkAccess(
398 $this->object->getRefId()
404 foreach (
$d as $row) {
406 if ($row[
'max'] > 0) {
408 for ($i = 0, $iMax = count($this->data[
'ctrl']); $i < $iMax; $i++) {
409 if ($this->data[
'ctrl'][$i][
'type'] == $row[
'name']) {
414 if ($row[
'max'] ==
'' || $count < $row[
'max']) {
415 $subobj[] = $row[
'name'];
420 if (is_array($subobj)) {
427 $this->tpl->setCurrentBlock(
'add_object');
428 $this->tpl->setVariable(
432 $this->tpl->setVariable(
436 $this->tpl->setVariable(
438 $this->
lng->txt(
'add')
440 $this->tpl->parseCurrentBlock();
446 $this->
ctrl->redirect(
454 $this->
ctrl->redirectByClass(
455 'ilrepositorysearchgui',
463 $this->
ilias->raiseError(
464 $this->
lng->txt(
'msg_no_perm_write'),
465 $this->
ilias->error_obj->WARNING
476 if (!$obj->getActive()) {
477 $obj->setLoginAttempts(0);
487 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'user_activated'),
true);
489 if ($this->user_request->getFrSearch()) {
490 $this->
ctrl->redirectByClass(
491 'ilRepositorySearchGUI',
495 $this->
ctrl->redirect(
505 $this->
ilias->raiseError(
506 $this->
lng->txt(
'msg_no_perm_write'),
507 $this->
ilias->error_obj->WARNING
526 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'user_deactivated'),
true);
528 if ($this->user_request->getFrSearch()) {
529 $this->
ctrl->redirectByClass(
530 'ilRepositorySearchGUI',
534 $this->
ctrl->redirect(
544 $this->
ilias->raiseError(
545 $this->
lng->txt(
'msg_no_perm_write'),
546 $this->
ilias->error_obj->WARNING
556 $obj->setTimeLimitUnlimited(
true);
557 $obj->setTimeLimitFrom(
null);
558 $obj->setTimeLimitUntil(
null);
559 $obj->setTimeLimitMessage(
'');
565 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'access_free_granted'),
true);
567 if ($this->user_request->getFrSearch()) {
568 $this->
ctrl->redirectByClass(
569 'ilRepositorySearchGUI',
573 $this->
ctrl->redirect(
582 bool $a_from_search =
false 587 $this->tpl->setContent($a_form->getHTML());
594 bool $a_from_search =
false 598 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
604 $form->
setTitle($this->
lng->txt(
'time_limit_add_time_limit_for_selected'));
606 $this->
ctrl->getFormAction(
608 'confirmaccessRestrict' 613 $this->
lng->txt(
'access_from'),
617 $from->setRequired(
true);
621 $this->
lng->txt(
'access_until'),
625 $to->setShowTime(
true);
629 'confirmaccessRestrict',
630 $this->
lng->txt(
'confirm')
634 $this->
lng->txt(
'cancel')
639 $ufield->setValue((
string) $user_id);
644 if ($a_from_search || $this->user_request->getFrSearch()) {
646 $field->setValue(
'1');
667 if ($timeuntil <= $timefrom) {
668 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'time_limit_not_valid'));
673 $this->
ilias->raiseError(
674 $this->
lng->txt(
'msg_no_perm_write'),
675 $this->
ilias->error_obj->WARNING
684 $obj->setTimeLimitUnlimited(
false);
685 $obj->setTimeLimitFrom((
int) $timefrom);
686 $obj->setTimeLimitUntil((
int) $timeuntil);
687 $obj->setTimeLimitMessage(
'');
691 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'access_restricted'),
true);
693 if ($this->user_request->getFrSearch()) {
694 $this->
ctrl->redirectByClass(
695 'ilRepositorySearchGUI',
699 $this->
ctrl->redirect(
709 if (!$this->rbac_system->checkAccess(
711 $this->object->getRefId()
713 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_delete'),
true);
714 $this->
ctrl->redirect(
720 $ids = $this->user_request->getIds();
722 $this->
user->getId(),
725 $this->
ilias->raiseError(
726 $this->
lng->txt(
'msg_no_delete_yourself'),
727 $this->
ilias->error_obj->WARNING
732 foreach ($ids as
$id) {
739 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'user_deleted'),
true);
741 if ($this->user_request->getFrSearch()) {
742 $this->
ctrl->redirectByClass(
743 'ilRepositorySearchGUI',
747 $this->
ctrl->redirect(
760 if ($this->getSelectAllPostArray()[
'select_cmd_all']) {
768 if (!$this->
access->checkAccess(
773 $this->
access->checkRbacOrPositionPermissionAccess(
779 $filtered_users = $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
786 $utab->addFilterItemValue(
792 return $utab->getUserIdsForFilter();
794 return $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
805 return $this->
access->checkRbacOrPositionPermissionAccess(
814 bool $a_from_search =
false 818 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_checkbox'));
823 if (!$a_from_search) {
824 $this->tabs_gui->activateTab(
'obj_usrf');
826 $this->tabs_gui->activateTab(
'search_user_extended');
845 if (strcmp($action,
'addToClipboard') === 0) {
852 if (!$a_from_search) {
853 $cancel =
'cancelUserFolderAction';
855 $cancel =
'cancelSearchAction';
860 $cgui->setFormAction($this->
ctrl->getFormAction($this));
861 $cgui->setHeaderText($this->
lng->txt(
'info_' . $action .
'_sure'));
863 $this->
lng->txt(
'cancel'),
867 $this->
lng->txt(
'confirm'),
871 if ($a_from_search) {
872 $cgui->addHiddenItem(
878 foreach ($user_ids as
$id) {
883 $login = $this->
lng->txt(
'never');
903 $this->tpl->setContent($cgui->getHTML());
910 if (!$this->
access->checkRbacOrPositionPermissionAccess(
915 $this->
ilias->raiseError(
916 $this->
lng->txt(
'permission_denied'),
917 $this->
ilias->error_obj->MESSAGE
922 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_delete_yourself'));
939 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_deactivate_yourself'));
966 $this->tabs_gui->clearTargets();
967 $this->tabs_gui->setBackTarget(
968 $this->
lng->txt(
'usrf'),
969 $this->
ctrl->getLinkTarget(
975 !$this->rbac_system->checkAccess(
'create_usr', $this->object->getRefId())
976 && !$this->
access->checkAccess(
'cat_administrate_users',
'', $this->object->getRefId())
978 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'));
982 $this->tpl->setContent($this->
form->getHTML());
991 $this->
lng->txt(
'import_file'),
995 $fi->setRequired(
true);
996 $this->
form->addItem($fi);
998 $this->
form->addCommandButton(
999 'importUserRoleAssignment',
1000 $this->
lng->txt(
'import')
1002 $this->
form->addCommandButton(
1004 $this->
lng->txt(
'cancel')
1007 $this->
form->setTitle($this->
lng->txt(
'import_users'));
1008 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1013 return (strtolower($this->user_request->getBaseClass()) ===
'iladministrationgui');
1019 if ($this->
filesystem->hasDir($import_dir)) {
1024 $this->
ctrl->redirect(
1029 $this->
ctrl->redirectByClass(
1042 $importDir =
'user_import/usr_' . $this->
user->getId() .
'_' . mb_substr(session_id(), 0, 8);
1052 $this->tabs_gui->clearTargets();
1053 $this->tabs_gui->setBackTarget(
1054 $this->
lng->txt(
'usrf'),
1055 $this->
ctrl->getLinkTarget(
1062 if ($this->
form->checkInput()) {
1068 $this->tpl->setContent(
$message . $this->ui_renderer->render($form));
1070 $this->
form->setValuesByPost();
1071 $this->tpl->setContent($this->
form->getHTML());
1081 $global_roles_assignment_info =
null;
1082 $local_roles_assignment_info =
null;
1085 $xml_file_full_path,
1088 $import_parser->startParsing();
1092 $xml_file_name = explode(
1096 $roles_import_filename = $this->ui_factory->input()->field()
1097 ->text($this->
lng->txt(
'import_file'))
1098 ->withDisabled(
true)
1099 ->withValue(end($xml_file_name));
1101 $roles_import_count = $this->ui_factory->input()->field()
1102 ->numeric($this->
lng->txt(
'num_users'))
1103 ->withDisabled(
true)
1104 ->withValue($import_parser->getUserCount());
1107 $xml_file_full_path,
1110 $import_parser->startParsing();
1112 $roles = $import_parser->getCollectedRoles();
1113 $all_gl_roles = $this->rbac_review->getRoleListByObject(
ROLE_FOLDER_ID);
1115 $roles_of_user = $this->rbac_review->assignedRoles($this->
user->getId());
1116 foreach ($all_gl_roles as $obj_data) {
1129 $gl_roles[$obj_data[
'obj_id']] = $obj_data[
'title'];
1134 $got_globals =
false;
1135 $global_selects = [];
1136 foreach ($roles as $role_id => $role) {
1137 if ($role[
'type'] ===
'Global') {
1138 $select_options = [];
1139 if (!$got_globals) {
1140 $global_roles_assignment_info = $this->ui_factory->input()->field()
1141 ->text($this->
lng->txt(
'roles_of_import_global'))
1142 ->withDisabled(
true)
1143 ->withValue($this->
lng->txt(
'assign_global_role'));
1145 $select_options[] = $this->
lng->txt(
'usrimport_ignore_role');
1148 foreach ($gl_roles as $key => $value) {
1149 $select_options[$role_id .
'-' . $key] = $value;
1153 $pre_select = array_search(
1158 switch ($role[
'name']) {
1159 case 'Administrator':
1160 $pre_select = array_search(
1167 $pre_select = array_search(
1174 $pre_select = array_search(
1181 $pre_select = array_search(
1188 $pre_select = array_search(
1196 $select = $this->ui_factory->input()->field()
1201 ->withValue($pre_select);
1203 if (!$got_globals) {
1204 $got_globals =
true;
1205 $global_selects[] = $select->withRequired(
true);
1207 $global_selects[] = $select;
1213 $got_locals =
false;
1214 foreach ($roles as $role_id => $role) {
1215 if ($role[
'type'] ==
'Local') {
1222 $local_roles_assignment_info = $this->ui_factory->input()->field()
1223 ->text($this->
lng->txt(
'roles_of_import_local'))
1224 ->withDisabled(
true)
1225 ->withValue($this->
lng->txt(
'assign_local_role'));
1237 foreach ($roles as $role_id => $role) {
1238 if ($role[
'type'] ==
'Local') {
1239 $searchName = (strpos($role[
'name'],
'#') === 0) ? $role[
'name'] :
'#' . $role[
'name'];
1240 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1241 foreach ($matching_role_ids as $mid) {
1246 $loc_roles[] = $mid;
1255 $loc_roles = $this->rbac_review->getAssignableRolesInSubtree($this->
object->getRefId());
1260 foreach ($loc_roles as $key => $loc_role) {
1262 $rolf = $this->rbac_review->getFoldersAssignedToRole(
1272 !$this->rbac_review->isDeleted($rolf[0]) &&
1273 $this->rbac_system->checkAccess(
1290 if ($this->tree->isInTree($rolf[0])) {
1293 $tmpPath = $this->tree->getPathFull($rolf[0]);
1294 $tmpPath[] = $rolf[0];
1296 for ($i = 1, $n = count($tmpPath) - 1; $i < $n; $i++) {
1297 if ($i < 3 || $i > $n - 3) {
1298 $path_array[] = $tmpPath[$i][
'title'];
1299 } elseif ($i == 3 || $i == $n - 3) {
1300 $path_array[] =
'...';
1303 $is_in_subtree |= $tmpPath[$i][
'obj_id'] == $this->
object->getId();
1308 array_reverse($path_array)
1311 $path =
'<b>Rolefolder ' . $rolf[0] .
' not found in tree! (Role ' . $loc_role .
')</b>';
1313 $roleMailboxAddress = (new \ilRoleMailboxAddress($loc_role))->value();
1314 $l_roles[$loc_role] = $roleMailboxAddress .
', ' .
$path;
1318 natcasesort($l_roles);
1319 $l_roles[
'ignore'] = $this->
lng->txt(
'usrimport_ignore_role');
1322 $local_selects = [];
1323 foreach ($roles as $role_id => $role) {
1324 if ($role[
'type'] ==
'Local') {
1325 $searchName = (strpos($role[
'name'],
'#') === 0) ? $role[
'name'] :
'#' . $role[
'name'];
1326 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1327 $pre_select = count($matching_role_ids) == 1 ? $role_id .
'-' . $matching_role_ids[0] :
'ignore';
1329 $selectable_roles = [];
1334 $selectable_roles[
'ignore'] = $this->
lng->txt(
'usrimport_ignore_role');
1335 foreach ($matching_role_ids as
$id) {
1336 $selectable_roles[$role_id .
'-' .
$id] = $l_roles[
$id];
1339 foreach ($l_roles as $local_role_id => $value) {
1340 if ($local_role_id !==
'ignore') {
1341 $selectable_roles[$role_id .
'-' . $local_role_id] = $value;
1346 if (count($selectable_roles) > 0) {
1347 $select = $this->ui_factory->input()->field()
1348 ->select($role[
'name'], $selectable_roles)
1349 ->withRequired(
true);
1350 if (array_key_exists($pre_select, $selectable_roles)) {
1351 $select = $select->withValue($pre_select);
1353 $local_selects[] = $select;
1364 $conflict_action_select = $this->ui_factory->input()->field()
1366 $this->
lng->txt(
'conflict_handling'),
1371 $this->
lng->txt(
'usrimport_conflict_handling_info')
1375 ->withRequired(
true);
1378 $this->
lng->loadLanguageModule(
'mail');
1380 $mail_section =
null;
1381 if (trim($amail[
'body'] ??
'') !=
'' && trim($amail[
'subject'] ??
'') !=
'') {
1382 $send_checkbox = $this->ui_factory->input()->field()->checkbox($this->
lng->txt(
'user_send_new_account_mail'))
1385 $mail_section = $this->ui_factory->input()->field()->section(
1387 $this->
lng->txt(
'mail_account_mail')
1391 $file_info_section = $this->ui_factory->input()->field()->section(
1393 'filename' => $roles_import_filename,
1394 'import_count' => $roles_import_count,
1396 $this->
lng->txt(
'file_info')
1399 $form_action = $this->
ctrl->getFormActionByClass(self::class,
'importUsers');
1402 'file_info' => $file_info_section
1405 if (!empty($global_selects)) {
1406 $global_role_info_section = $this->ui_factory->input()
1408 ->section([$global_roles_assignment_info], $this->
lng->txt(
'global_role_assignment'));
1409 $global_role_selection_section = $this->ui_factory->input()->field()->section($global_selects,
'');
1410 $form_elements[
'global_role_info'] = $global_role_info_section;
1411 $form_elements[
'global_role_selection'] = $global_role_selection_section;
1414 if (!empty($local_selects)) {
1415 $local_role_info_section = $this->ui_factory->input()->field()->section(
1416 [$local_roles_assignment_info],
1417 $this->
lng->txt(
'local_role_assignment')
1419 $local_role_selection_section = $this->ui_factory->input()->field()->section(
1424 $form_elements[
'local_role_info'] = $local_role_info_section;
1425 $form_elements[
'local_role_selection'] = $local_role_selection_section;
1428 $form_elements[
'conflict_action'] = $this->ui_factory->input()->field()->section([$conflict_action_select],
'');
1430 if ($mail_section !==
null) {
1431 $form_elements[
'send_mail'] = $mail_section;
1434 return [$this->ui_factory->input()->container()->form()->standard(
1447 if (!$this->
upload->hasBeenProcessed()) {
1448 $this->
upload->process();
1452 if ($this->
filesystem->hasDir($import_dir)) {
1457 foreach ($this->
upload->getResults() as $single_file_upload) {
1458 $file_name = $single_file_upload->getName();
1459 $parts = pathinfo($file_name);
1462 if (!$single_file_upload->isOK()) {
1464 $this->
ilias->raiseError(
1465 $this->
lng->txt(
'no_import_file_found'),
1466 $this->
ilias->error_obj->MESSAGE
1471 $this->
upload->moveFilesTo(
1477 if ($single_file_upload->getMimeType() ==
'application/zip') {
1480 . $this->
user->getId() .
'_' . session_id() .
'/' . $file_name;
1481 $this->dic->legacyArchives()->unzip($full_path);
1484 $file_list = $this->
filesystem->listContents($import_dir);
1486 foreach ($file_list as $key => $a_file) {
1491 unset($file_list[$key]);
1492 $xml_file = $a_file->getPath();
1498 foreach ($file_list as $a_file) {
1499 $this->
filesystem->delete($a_file->getPath());
1502 if (is_null($xml_file)) {
1505 '.' .
$parts[
'extension']
1507 $xml_file = $import_dir .
'/' . $subdir .
'/' . $subdir .
'.xml';
1513 $xml_file = $file->getPath();
1519 $this->
ilias->raiseError(
1520 $this->
lng->txt(
'no_xml_file_found_in_zip')
1521 .
' ' . $subdir .
'/' . $subdir .
'.xml',
1522 $this->
ilias->error_obj->MESSAGE
1540 $this->tpl->setOnScreenMessage(
1543 $this->
lng->txt(
'verification_failure_log')
1547 $this->
ctrl->redirectByClass(self::class,
'importUserForm');
1560 $file_list = $this->
filesystem->listContents($import_dir);
1562 if (count($file_list) > 1) {
1564 $this->tpl->setOnScreenMessage($this->
lng->txt(
'usrimport_wrong_file_count'),
true);
1567 $xml_file = $file_list[0]->getPath();
1572 if (!$this->user_request->isPost()) {
1573 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'usrimport_form_not_evaluabe'),
true);
1578 $result = $form->getData();
1580 if ($result ===
null) {
1581 $this->tpl->setContent($this->ui_renderer->render($form));
1585 $rule = $result[
'conflict_action'][0] ?? 1;
1588 $local_role_selection = (array) ($result[
'local_role_selection'] ?? []);
1589 $global_role_selection = (array) ($result[
'global_role_selection'] ?? []);
1590 $roles = array_merge(
1591 $local_role_selection,
1592 $global_role_selection
1595 $role_assignment = [];
1596 foreach ($roles as $value) {
1601 if (count($keys) === 2) {
1602 $role_assignment[$keys[0]] = $keys[1];
1616 if (!empty($role_assignment)) {
1617 $global_roles = $this->rbac_review->getGlobalRoles();
1618 $roles_of_user = $this->rbac_review->assignedRoles($this->
user->getId());
1619 foreach ($role_assignment as $role_id_string) {
1620 $role_id = $this->
refinery->byTrying([
1621 $this->
refinery->kindlyTo()->int(),
1624 if ($role_id ===
null) {
1636 if (isset($result[
'send_mail'])) {
1637 $import_parser->setSendMail($result[
'send_mail'][0]);
1640 $import_parser->setRoleAssignment($role_assignment);
1641 $import_parser->startParsing();
1646 switch ($import_parser->getErrorLevel()) {
1648 $this->tpl->setOnScreenMessage(
1650 $this->
lng->txt(
'user_imported'),
1655 $this->tpl->setOnScreenMessage(
1657 $this->
lng->txt(
'user_imported_with_warnings')
1658 . $import_parser->getProtocolAsHTML(
1659 $this->
lng->txt(
'import_warning_log')
1665 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_import_failed'),
true);
1671 $this->
ctrl->redirect(
1676 $this->
ctrl->redirectByClass(
1685 array $roles_of_user,
1686 array $global_roles,
1705 $this->tpl->setOnScreenMessage(
1707 $this->
lng->txt(
'usrimport_with_specified_role_not_permitted'),
1715 $rolf = $this->rbac_review->getFoldersAssignedToRole(
1719 if ($this->rbac_review->isDeleted($rolf[0])
1720 || !$this->rbac_system->checkAccess(
1726 $this->tpl->setOnScreenMessage(
1728 $this->
lng->txt(
'usrimport_with_specified_role_not_permitted'),
1742 $show_blocking_time_in_days = $this->
settings->get(
'loginname_change_blocking_time') / 86400;
1743 $show_blocking_time_in_days = (float) $show_blocking_time_in_days;
1748 'lua' => $aset->isLocalUserAdministrationEnabled(),
1749 'lrua' => $aset->isUserAccessRestricted(),
1750 'allow_change_loginname' => (bool) $this->
settings->get(
'allow_change_loginname'),
1751 'create_history_loginname' => (bool) $this->
settings->get(
'create_history_loginname'),
1752 'reuse_of_loginnames' => (bool) $this->
settings->get(
'reuse_of_loginnames'),
1753 'loginname_change_blocking_time' => $show_blocking_time_in_days,
1754 'user_reactivate_code' => (
int) $this->
settings->get(
'user_reactivate_code'),
1755 'user_own_account' => (
int) $this->
settings->get(
'user_delete_own_account'),
1756 'user_own_account_email' => $this->
settings->get(
'user_delete_own_account_email'),
1757 'dpro_withdrawal_usr_deletion' => (bool) $this->
settings->get(
'dpro_withdrawal_usr_deletion'),
1758 'tos_withdrawal_usr_deletion' => (bool) $this->
settings->get(
'tos_withdrawal_usr_deletion'),
1759 'login_max_attempts' => $security->getLoginMaxAttempts() > 0 ? $security->getLoginMaxAttempts() :
'',
1760 'ps_prevent_simultaneous_logins' => (
int) $security->isPreventionOfSimultaneousLoginsEnabled(),
1761 'password_assistance' => (bool) $this->
settings->get(
'password_assistance'),
1762 'letter_avatars' => (
int) $this->
settings->get(
'letter_avatars'),
1763 'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1764 'password_max_age' => $security->getPasswordMaxAge()
1768 $this->
form->setValuesByArray(
1771 $passwordPolicySettings,
1772 [
'pw_policy_hash' => md5(
1775 $passwordPolicySettings
1782 $this->tpl->setContent($this->
form->getHTML());
1805 if ($this->
form->checkInput()) {
1807 if ($this->
form->getInput(
'allow_change_loginname') ===
'1' &&
1808 !is_numeric($this->
form->getInput(
'loginname_change_blocking_time'))) {
1810 $this->
form->getItemByPostVar(
'loginname_change_blocking_time')
1811 ->setAlert($this->
lng->txt(
'loginname_change_blocking_time_invalidity_info'));
1817 $security->setPasswordCharsAndNumbersEnabled(
1818 (
bool) $this->
form->getInput(
'password_chars_and_numbers_enabled')
1820 $security->setPasswordSpecialCharsEnabled(
1821 (
bool) $this->
form->getInput(
'password_special_chars_enabled')
1823 $security->setPasswordMinLength(
1824 (
int) $this->
form->getInput(
'password_min_length')
1826 $security->setPasswordMaxLength(
1827 (
int) $this->
form->getInput(
'password_max_length')
1829 $security->setPasswordNumberOfUppercaseChars(
1830 (
int) $this->
form->getInput(
'password_ucase_chars_num')
1832 $security->setPasswordNumberOfLowercaseChars(
1833 (
int) $this->
form->getInput(
'password_lowercase_chars_num')
1835 $security->setPasswordMaxAge(
1836 (
int) $this->
form->getInput(
'password_max_age')
1838 $security->setLoginMaxAttempts(
1839 (
int) $this->
form->getInput(
'login_max_attempts')
1841 $security->setPreventionOfSimultaneousLogins(
1842 (
bool) $this->
form->getInput(
'ps_prevent_simultaneous_logins')
1844 $security->setPasswordChangeOnFirstLoginEnabled(
1845 (
bool) $this->
form->getInput(
'password_change_on_first_login_enabled')
1847 $security->setPasswordMustNotContainLoginnameStatus(
1848 (
bool) $this->
form->getInput(
'password_must_not_contain_loginame')
1851 if ($security->validate($this->form) !==
null) {
1863 'allow_change_loginname',
1864 $this->
form->getInput(
'allow_change_loginname')
1867 'create_history_loginname',
1868 $this->
form->getInput(
'create_history_loginname')
1871 'reuse_of_loginnames',
1872 $this->
form->getInput(
'reuse_of_loginnames')
1874 $save_blocking_time_in_seconds = (string) ((
int) $this->
form->getInput(
1875 'loginname_change_blocking_time' 1878 'loginname_change_blocking_time',
1879 $save_blocking_time_in_seconds
1882 'user_reactivate_code',
1883 $this->
form->getInput(
'user_reactivate_code')
1887 'user_delete_own_account',
1888 $this->
form->getInput(
'user_own_account')
1891 'user_delete_own_account_email',
1892 $this->
form->getInput(
'user_own_account_email')
1895 'dpro_withdrawal_usr_deletion',
1896 $this->
form->getInput(
'dpro_withdrawal_usr_deletion') ===
'1' ?
'1' :
'0' 1899 'tos_withdrawal_usr_deletion',
1900 $this->
form->getInput(
'tos_withdrawal_usr_deletion') ===
'1' ?
'1' :
'0' 1904 'password_assistance',
1905 $this->
form->getInput(
'password_assistance')
1910 $this->
form->getInput(
'letter_avatars')
1913 $requestPasswordReset =
false;
1914 if ($this->
form->getInput(
'pw_policy_hash')) {
1915 $oldSettingsHash = $this->
form->getInput(
'pw_policy_hash');
1916 $currentSettingsHash = md5(
1922 $requestPasswordReset = ($oldSettingsHash !== $currentSettingsHash);
1925 if ($requestPasswordReset) {
1926 $this->
ctrl->redirect(
1928 'askForUserPasswordReset' 1931 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'saved_successfully'));
1934 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
1937 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
1939 $this->
form->setValuesByPost();
1940 $this->tpl->setContent($this->
form->getHTML());
1945 LocalUserPasswordManager::getInstance()->resetLastPasswordChangeForLocalUsers();
1946 $this->
lng->loadLanguageModule(
'ps');
1948 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'ps_passwd_policy_change_force_user_reset_succ'),
true);
1949 $this->
ctrl->redirect(
1957 $this->
lng->loadLanguageModule(
'ps');
1959 $this->tpl->setOnScreenMessage(
1961 $this->
lng->txt(
'ps_passwd_policy_changed_force_user_reset')
1965 $this->ui_factory->button()->standard(
1966 $this->
lng->txt(
'yes'),
1967 $this->
ctrl->getLinkTargetByClass(self::class,
'forceUserPasswordReset')
1972 $this->ui_factory->button()->standard(
1973 $this->
lng->txt(
'no'),
1974 $this->
ctrl->getLinkTargetByClass(self::class,
'generalSettings')
1982 $this->tabs_gui->setTabActive(
'settings');
1983 $this->tabs_gui->setSubTabActive(
'general_settings');
1986 $this->
form->setFormAction(
1987 $this->
ctrl->getFormAction(
1989 'saveGeneralSettings' 1993 $this->
form->setTitle($this->
lng->txt(
'general_settings'));
1996 $this->
lng->txt(
'enable_local_user_administration'),
1999 $lua->setInfo($this->
lng->txt(
'enable_local_user_administration_info'));
2000 $lua->setValue(
'1');
2001 $this->
form->addItem($lua);
2004 $this->
lng->txt(
'restrict_user_access'),
2007 $lrua->setInfo($this->
lng->txt(
'restrict_user_access_info'));
2008 $lrua->setValue(
'1');
2009 $this->
form->addItem($lrua);
2012 $this->
lng->txt(
'user_account_code_setting'),
2013 'user_reactivate_code' 2015 $code->setInfo($this->
lng->txt(
'user_account_code_setting_info'));
2016 $this->
form->addItem($code);
2019 $this->
lng->txt(
'user_allow_delete_own_account'),
2022 $this->
form->addItem($own);
2024 $this->
lng->txt(
'user_delete_own_account_notification_email'),
2025 'user_own_account_email' 2027 $own->addSubItem($own_email);
2029 $this->
lng->loadLanguageModule(
'tos');
2030 $this->
lng->loadLanguageModule(
'dpro');
2031 $this->
form->addItem($this->
checkbox(
'tos_withdrawal_usr_deletion'));
2032 $this->
form->addItem($this->
checkbox(
'dpro_withdrawal_usr_deletion'));
2034 $allow_client_maintenance = $this->
settings->get(
2035 'session_allow_client_maintenance',
2039 $this->
lng->loadLanguageModule(
'ps');
2042 $pass->setTitle($this->
lng->txt(
'ps_password_settings'));
2043 $this->
form->addItem($pass);
2046 $this->
lng->txt(
'ps_password_change_on_first_login_enabled'),
2047 'password_change_on_first_login_enabled' 2049 $check->setInfo($this->
lng->txt(
'ps_password_change_on_first_login_enabled_info'));
2053 $this->
lng->txt(
'ps_password_must_not_contain_loginame'),
2054 'password_must_not_contain_loginame' 2056 $check->setInfo($this->
lng->txt(
'ps_password_must_not_contain_loginame_info'));
2060 $this->
lng->txt(
'ps_password_chars_and_numbers_enabled'),
2061 'password_chars_and_numbers_enabled' 2064 $check->setInfo($this->
lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
2068 $this->
lng->txt(
'ps_password_special_chars_enabled'),
2069 'password_special_chars_enabled' 2072 $check->setInfo($this->
lng->txt(
'ps_password_special_chars_enabled_info'));
2076 $this->
lng->txt(
'ps_password_min_length'),
2077 'password_min_length' 2079 $text->
setInfo($this->
lng->txt(
'ps_password_min_length_info'));
2081 $text->setMaxLength(2);
2082 $this->
form->addItem($text);
2085 $this->
lng->txt(
'ps_password_max_length'),
2086 'password_max_length' 2088 $text->
setInfo($this->
lng->txt(
'ps_password_max_length_info'));
2090 $text->setMaxLength(3);
2091 $this->
form->addItem($text);
2094 $this->
lng->txt(
'ps_password_uppercase_chars_num'),
2095 'password_ucase_chars_num' 2097 $text->
setInfo($this->
lng->txt(
'ps_password_uppercase_chars_num_info'));
2098 $text->setMinValue(0);
2100 $text->setMaxLength(3);
2101 $this->
form->addItem($text);
2104 $this->
lng->txt(
'ps_password_lowercase_chars_num'),
2105 'password_lowercase_chars_num' 2107 $text->
setInfo($this->
lng->txt(
'ps_password_lowercase_chars_num_info'));
2108 $text->setMinValue(0);
2110 $text->setMaxLength(3);
2111 $this->
form->addItem($text);
2114 $this->
lng->txt(
'ps_password_max_age'),
2117 $text->
setInfo($this->
lng->txt(
'ps_password_max_age_info'));
2119 $text->setMaxLength(3);
2120 $this->
form->addItem($text);
2124 $this->
lng->txt(
'enable_password_assistance'),
2125 'password_assistance' 2127 $cb->setInfo($this->
lng->txt(
'password_assistance_info'));
2128 $this->
form->addItem($cb);
2131 $pass->setTitle($this->
lng->txt(
'ps_security_protection'));
2132 $this->
form->addItem($pass);
2135 $this->
lng->txt(
'ps_login_max_attempts'),
2136 'login_max_attempts' 2138 $text->
setInfo($this->
lng->txt(
'ps_login_max_attempts_info'));
2139 $text->allowDecimals(
false);
2140 $text->setMinValue(1);
2143 $text->setMaxLength(2);
2144 $this->
form->addItem($text);
2148 $this->
lng->txt(
'ps_prevent_simultaneous_logins'),
2149 'ps_prevent_simultaneous_logins' 2151 $objCb->setValue(
'1');
2152 $objCb->setInfo($this->
lng->txt(
'ps_prevent_simultaneous_logins_info'));
2153 $this->
form->addItem($objCb);
2156 $log->setTitle($this->
lng->txt(
'loginname_settings'));
2157 $this->
form->addItem($log);
2160 $this->
lng->txt(
'allow_change_loginname'),
2161 'allow_change_loginname' 2163 $chbChangeLogin->setValue(
'1');
2164 $this->
form->addItem($chbChangeLogin);
2166 $this->
lng->txt(
'history_loginname'),
2167 'create_history_loginname' 2169 $chbCreateHistory->setInfo($this->
lng->txt(
'loginname_history_info'));
2170 $chbCreateHistory->setValue(
'1');
2172 $chbChangeLogin->addSubItem($chbCreateHistory);
2174 $this->
lng->txt(
'reuse_of_loginnames_contained_in_history'),
2175 'reuse_of_loginnames' 2177 $chbReuseLoginnames->setValue(
'1');
2178 $chbReuseLoginnames->setInfo($this->
lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2180 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2182 $this->
lng->txt(
'loginname_change_blocking_time'),
2183 'loginname_change_blocking_time' 2186 $chbChangeBlockingTime->setSuffix($this->
lng->txt(
'days'));
2187 $chbChangeBlockingTime->setInfo($this->
lng->txt(
'loginname_change_blocking_time_info'));
2188 $chbChangeBlockingTime->setSize(10);
2189 $chbChangeBlockingTime->setMaxLength(10);
2190 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2193 $this->
lng->txt(
'usr_letter_avatars'),
2197 $la->setInfo($this->
lng->txt(
'usr_letter_avatars_info'));
2198 $this->
form->addItem($la);
2200 $passwordPolicySettingsHash = new \ilHiddenInputGUI(
'pw_policy_hash');
2201 $this->
form->addItem($passwordPolicySettingsHash);
2203 $this->
form->addCommandButton(
2204 'saveGeneralSettings',
2205 $this->
lng->txt(
'save')
2221 $this->
lng->loadLanguageModule(
'administration');
2222 $this->
lng->loadLanguageModule(
'mail');
2223 $this->
lng->loadLanguageModule(
'chatroom');
2225 $this->tabs_gui->activateTab(
'settings');
2226 $this->tabs_gui->activateSubTab(
'standard_fields');
2232 if ($this->confirm_change) {
2233 $tab->setConfirmChange();
2235 $this->tpl->setContent($tab->getHTML());
2248 $checked = $this->user_request->getChecked();
2249 $selected = $this->user_request->getSelect();
2255 $up->skipField(
'username');
2256 $field_properties = $up->getStandardFields();
2257 $profile_fields = array_keys($field_properties);
2260 foreach ($profile_fields as $field) {
2261 if (($checked[
'required_' . $field] ??
false) &&
2262 !(
int) ($checked[
'visib_reg_' . $field] ??
null)
2270 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'invalid_visible_required_options_selected'));
2271 $this->confirm_change = 1;
2277 $fixed_required_fields = [
2284 'hide_own_online_status' => 0
2288 if ($action ==
'save') {
2293 if ($this->handleChangeListeners($changed_fields, $field_properties)) {
2297 foreach ($profile_fields as $field) {
2302 (
bool) ($checked[
'searchable_' . $field] ??
false)
2306 if (!($checked[
'visible_' . $field] ??
false) && !($field_properties[$field][
'visible_hide'] ??
false)) {
2318 if (!($checked[
'changeable_' . $field] ??
false) &&
2319 !($field_properties[$field][
'changeable_hide'] ??
false)) {
2332 if (($checked[
'visib_reg_' . $field] ??
false) && !($field_properties[$field][
'visib_reg_hide'] ??
false)) {
2334 'usr_settings_visib_reg_' . $field,
2339 'usr_settings_visib_reg_' . $field,
2344 if ($checked[
'visib_lua_' . $field] ??
false) {
2346 'usr_settings_visib_lua_' . $field,
2351 'usr_settings_visib_lua_' . $field,
2356 if ((
int) ($checked[
'changeable_lua_' . $field] ??
false)) {
2358 'usr_settings_changeable_lua_' . $field,
2363 'usr_settings_changeable_lua_' . $field,
2368 if (($checked[
'export_' . $field] ??
false) && !($field_properties[$field][
'export_hide'] ??
false)) {
2369 $this->
ilias->setSetting(
2370 'usr_settings_export_' . $field,
2374 $this->
ilias->deleteSetting(
'usr_settings_export_' . $field);
2378 if (($checked[
'course_export_' . $field] ??
false) && !($field_properties[$field][
'course_export_hide'] ??
false)) {
2379 $this->
ilias->setSetting(
2380 'usr_settings_course_export_' . $field,
2384 $this->
ilias->deleteSetting(
'usr_settings_course_export_' . $field);
2388 if (($checked[
'group_export_' . $field] ??
false) && !($field_properties[$field][
'group_export_hide'] ??
false)) {
2389 $this->
ilias->setSetting(
2390 'usr_settings_group_export_' . $field,
2394 $this->
ilias->deleteSetting(
'usr_settings_group_export_' . $field);
2397 if (($checked[
'prg_export_' . $field] ??
false) && !($field_properties[$field][
'prg_export_hide'] ??
false)) {
2398 $this->
ilias->setSetting(
2399 'usr_settings_prg_export_' . $field,
2403 $this->
ilias->deleteSetting(
'usr_settings_prg_export_' . $field);
2406 $is_fixed = array_key_exists(
2408 $fixed_required_fields
2410 if (($is_fixed && $fixed_required_fields[$field]) || (!$is_fixed && ($checked[
'required_' . $field] ??
false))) {
2411 $this->
ilias->setSetting(
2412 'require_' . $field,
2416 $this->
ilias->deleteSetting(
'require_' . $field);
2420 $this->
ilias->setSetting(
2421 'session_reminder_lead_time',
2422 $this->user_request->getDefaultSessionReminder()
2425 if (isset($checked[
'export_preferences']) && $checked[
'export_preferences'] === 1) {
2426 $this->
ilias->setSetting(
2427 'usr_settings_export_preferences',
2431 $this->
ilias->deleteSetting(
'usr_settings_export_preferences');
2434 $this->
ilias->setSetting(
2435 'mail_incoming_mail',
2436 $selected[
'default_mail_incoming_mail'] ??
'0' 2438 $this->
ilias->setSetting(
2439 'chat_osc_accept_msg',
2440 $selected[
'default_chat_osc_accept_msg'] ??
'n' 2442 $this->
ilias->setSetting(
2443 'chat_broadcast_typing',
2444 $selected[
'default_chat_broadcast_typing'] ??
'n' 2446 $this->
ilias->setSetting(
2447 'bs_allow_to_contact_me',
2448 $selected[
'default_bs_allow_to_contact_me'] ??
'n' 2450 $this->
ilias->setSetting(
2451 'hide_own_online_status',
2452 $selected[
'default_hide_own_online_status'] ??
'n' 2455 if ($this->usrFieldChangeListenersAccepted && count($changed_fields) > 0) {
2456 $this->
event->raise(
2457 'components/ILIAS/User',
2458 'onUserFieldAttributesChanged',
2463 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'usr_settings_saved'));
2469 $this->usrFieldChangeListenersAccepted =
true;
2477 array $interested_change_listeners
2479 $post = $this->user_request->getParsedBody();
2481 $confirmDialog->setHeaderText($this->
lng->txt(
'usr_field_change_components_listening'));
2482 $confirmDialog->setFormAction($this->
ctrl->getFormActionByClass(
2486 $confirmDialog->setConfirm($this->
lng->txt(
'confirm'),
'confirmUsrFieldChangeListeners');
2487 $confirmDialog->setCancel($this->
lng->txt(
'cancel'),
'settings');
2490 'tpl.usr_field_change_listener_confirm.html',
2493 'components/ILIAS/User' 2496 foreach ($interested_change_listeners as $interested_change_listener) {
2497 $tpl->
setVariable(
'FIELD_NAME', $interested_change_listener->getName());
2498 foreach ($interested_change_listener->getAttributes() as $attribute) {
2500 foreach ($attribute->getComponents() as $component) {
2513 $confirmDialog->addItem(
'',
'0',
$tpl->
get());
2515 foreach (
$post[
'chb'] as $postVar => $value) {
2516 $confirmDialog->addHiddenItem(
"chb[{$postVar}]", $value);
2518 foreach (
$post[
'select'] as $postVar => $value) {
2519 $confirmDialog->addHiddenItem(
"select[{$postVar}]", $value);
2521 foreach (
$post[
'current'] as $postVar => $value) {
2522 $confirmDialog->addHiddenItem(
"current[{$postVar}]", $value);
2524 $this->tpl->setContent($confirmDialog->getHTML());
2532 private function handleChangeListeners(
2533 array $changed_fields,
2534 array $field_properties
2536 if (count($changed_fields) > 0) {
2537 $interested_change_listeners = [];
2538 foreach ($field_properties as $field_name => $properties) {
2539 if (!isset($properties[
'change_listeners'])) {
2543 foreach ($properties[
'change_listeners'] as $change_listener_class_name) {
2547 $listener =
new $change_listener_class_name($this->dic);
2548 foreach ($changed_fields as $changed_field) {
2549 $attribute_name = $changed_field->getAttributeName();
2550 $description_for_field = $listener->getDescriptionForField($field_name, $attribute_name);
2551 if ($description_for_field !==
null && $description_for_field !==
'') {
2552 $interested_change_listener =
null;
2553 foreach ($interested_change_listeners as $interested_listener) {
2554 if ($interested_listener->getFieldName() === $field_name) {
2555 $interested_change_listener = $interested_listener;
2560 if ($interested_change_listener ===
null) {
2566 $interested_change_listeners[] = $interested_change_listener;
2569 $interested_attribute = $interested_change_listener->addAttribute($attribute_name);
2570 $interested_attribute->addComponent(
2571 $listener->getComponentName(),
2572 $description_for_field
2579 if (!$this->usrFieldChangeListenersAccepted && count($interested_change_listeners) > 0) {
2593 $changed_fields = [];
2594 $post = $this->user_request->getParsedBody();
2596 !isset(
$post[
'chb'])
2597 && !is_array(
$post[
'chb'])
2598 && !isset(
$post[
'current'])
2599 && !is_array(
$post[
'current'])
2601 return $changed_fields;
2604 $old =
$post[
'current'];
2605 $new =
$post[
'chb'];
2607 foreach ($old as $key => $old_value) {
2608 if (!isset($new[$key])) {
2609 $is_boolean = filter_var($old_value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
2610 $new[$key] = $is_boolean ?
'0' : $old_value;
2614 $oldToNewDiff = array_diff_assoc($old, $new);
2616 foreach ($oldToNewDiff as $key => $old_value) {
2620 return $changed_fields;
2628 $action[-1] = $this->
lng->txt(
'all_users');
2629 $action[1] = $this->
lng->txt(
'usr_active_only');
2630 $action[0] = $this->
lng->txt(
'usr_inactive_only');
2631 $action[2] = $this->
lng->txt(
'usr_limited_access_only');
2632 $action[3] = $this->
lng->txt(
'usr_without_courses');
2633 $action[4] = $this->
lng->txt(
'usr_filter_lastlogin');
2634 $action[5] = $this->
lng->txt(
'usr_filter_coursemember');
2635 $action[6] = $this->
lng->txt(
'usr_filter_groupmember');
2636 $action[7] = $this->
lng->txt(
'usr_filter_role');
2653 $files = $this->user_request->getFiles();
2654 if (count($files) == 0) {
2655 $this->
ilias->raiseError(
2656 $this->
lng->txt(
'no_checkbox'),
2657 $this->
ilias->error_obj->MESSAGE
2661 if (count($files) > 1) {
2662 $this->
ilias->raiseError(
2663 $this->
lng->txt(
'select_max_one_item'),
2664 $this->
ilias->error_obj->MESSAGE
2668 $file = basename($files[0]);
2670 $export_dir = $this->
object->getExportDirectory();
2672 $export_dir .
'/' . $file,
2679 $files = $this->user_request->getFiles();
2680 if (count($files) == 0) {
2681 $this->
ilias->raiseError(
2682 $this->
lng->txt(
'no_checkbox'),
2683 $this->
ilias->error_obj->MESSAGE
2688 $cgui->setFormAction($this->
ctrl->getFormAction($this));
2689 $cgui->setHeaderText($this->
lng->txt(
'info_delete_sure'));
2691 $this->
lng->txt(
'cancel'),
2692 'cancelDeleteExportFile' 2695 $this->
lng->txt(
'confirm'),
2700 foreach ($files as $file) {
2706 $this->
lng->txt(
'obj_usrf')
2710 $this->tpl->setContent($cgui->getHTML());
2715 $this->
ctrl->redirectByClass(
2716 'ilobjuserfoldergui',
2724 $files = $this->user_request->getFiles();
2725 $export_dir = $this->
object->getExportDirectory();
2726 foreach ($files as $file) {
2727 $file = basename($file);
2729 $exp_file = $export_dir .
'/' . $file;
2730 if (is_file($exp_file)) {
2734 $this->
ctrl->redirectByClass(
2735 'ilobjuserfoldergui',
2748 $this->
object->buildExportFile($this->user_request->getExportType());
2749 $this->
ctrl->redirect(
2760 'userfolder_export_excel_x86',
2761 'userfolder_export_csv',
2762 'userfolder_export_xml' 2765 foreach ($export_types as
$type) {
2766 $this->
ctrl->setParameterByClass(self::class,
'export_type', $type);
2767 $options[] = $this->ui_factory->button()->shy(
2768 $this->
lng->txt($type),
2769 $this->
ctrl->getLinkTargetByClass(self::class,
'performExport')
2772 $type_selection = $this->ui_factory->dropdown()->standard($options)
2773 ->withLabel($this->
lng->txt(
'create_export_file'));
2780 $table = new \ilUserExportFileTableGUI(
2785 $table->parse($this->
object->getExportFiles());
2787 $this->tpl->setContent($table->getHTML());
2792 $this->
lng->loadLanguageModule(
'meta');
2793 $this->
lng->loadLanguageModule(
'mail');
2799 $form->
setTitle($this->
lng->txt(
'user_new_account_mail'));
2802 $langs = $this->
lng->getInstalledLanguages();
2803 foreach ($langs as $lang_key) {
2806 $title = $this->
lng->txt(
'meta_l_' . $lang_key);
2807 if ($lang_key == $this->
lng->getDefaultLanguage()) {
2808 $title .=
' (' . $this->
lng->txt(
'default') .
')';
2812 $header->setTitle($title);
2816 $this->
lng->txt(
'subject'),
2817 'subject_' . $lang_key
2819 $subj->setValue($amail[
'subject'] ??
'');
2823 $this->
lng->txt(
'mail_salutation_general'),
2824 'sal_g_' . $lang_key
2826 $salg->setValue($amail[
'sal_g'] ??
'');
2830 $this->
lng->txt(
'mail_salutation_female'),
2831 'sal_f_' . $lang_key
2833 $salf->setValue($amail[
'sal_f'] ??
'');
2837 $this->
lng->txt(
'mail_salutation_male'),
2838 'sal_m_' . $lang_key
2840 $salm->setValue($amail[
'sal_m'] ??
'');
2844 $this->
lng->txt(
'message_content'),
2847 $body->
setValue($amail[
'body'] ??
'');
2849 $body->setCols(100);
2853 $this->
lng->txt(
'attachment'),
2857 if ($amail[
'att_file'] ??
false) {
2858 $att->setValue($amail[
'att_file']);
2864 'saveNewAccountMail',
2865 $this->
lng->txt(
'save')
2868 'cancelNewAccountMail',
2869 $this->
lng->txt(
'cancel')
2879 $this->tabs_gui->setTabActive(
'settings');
2880 $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
2882 if ($form ===
null) {
2887 'tpl.usrf_new_account_mail.html',
2890 'components/ILIAS/User' 2899 'TXT_USE_PLACEHOLDERS',
2900 $this->
lng->txt(
'mail_nacc_use_placeholder')
2903 'TXT_MAIL_SALUTATION',
2904 $this->
lng->txt(
'mail_nacc_salutation')
2908 $this->
lng->txt(
'firstname')
2912 $this->
lng->txt(
'lastname')
2916 $this->
lng->txt(
'email')
2920 $this->
lng->txt(
'mail_nacc_login')
2924 $this->
lng->txt(
'password')
2927 'TXT_PASSWORD_BLOCK',
2928 $this->
lng->txt(
'mail_nacc_pw_block')
2931 'TXT_NOPASSWORD_BLOCK',
2932 $this->
lng->txt(
'mail_nacc_no_pw_block')
2936 $this->
lng->txt(
'mail_nacc_admin_mail')
2940 $this->
lng->txt(
'mail_nacc_ilias_url')
2943 'TXT_INSTALLATION_NAME',
2944 $this->
lng->txt(
'mail_nacc_installation_name')
2948 $this->
lng->txt(
'mail_nacc_target')
2952 $this->
lng->txt(
'mail_nacc_target_title')
2956 $this->
lng->txt(
'mail_nacc_target_type')
2960 $this->
lng->txt(
'mail_nacc_target_block')
2964 $this->
lng->txt(
'mail_nacc_if_timelimit')
2968 $this->
lng->txt(
'mail_nacc_timelimit')
2971 $this->tpl->setContent($ftpl->get());
2976 $this->
ctrl->redirect(
2988 $is_valid_template_syntax = $this->dic->refinery()->custom()->constraint(
function ($value):
bool {
2990 $this->dic->mail()->mustacheFactory()->getBasicEngine()->render((
string) $value, []);
2995 }, $this->dic->language()->txt(
'mail_template_invalid_tpl_syntax'));
2997 $valid_templates =
true;
2998 $langs = $this->
lng->getInstalledLanguages();
2999 foreach ($langs as $lang_key) {
3000 $subject = $this->user_request->getMailSubject($lang_key);
3002 $is_valid_template_syntax->check($subject);
3005 $is_valid_template_syntax->problemWith($subject)
3007 $valid_templates =
false;
3010 $body = $this->user_request->getMailBody($lang_key);
3012 $is_valid_template_syntax->check($body);
3015 $is_valid_template_syntax->problemWith($body)
3017 $valid_templates =
false;
3020 if (!$valid_templates) {
3021 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
3026 foreach ($langs as $lang_key) {
3029 $this->user_request->getMailSubject($lang_key),
3030 $this->user_request->getMailSalutation(
'g', $lang_key),
3031 $this->user_request->getMailSalutation(
'f', $lang_key),
3032 $this->user_request->getMailSalutation(
'm', $lang_key),
3033 $this->user_request->getMailBody($lang_key)
3036 if ($_FILES[
'att_' . $lang_key][
'tmp_name']) {
3039 $_FILES[
'att_' . $lang_key][
'tmp_name'],
3040 $_FILES[
'att_' . $lang_key][
'name']
3044 if ($this->user_request->getMailAttDelete($lang_key)) {
3049 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
3050 $this->
ctrl->redirect(
3063 if ($this->
access->checkRbacOrPositionPermissionAccess(
3066 $this->object->getRefId()
3068 $this->tabs_gui->addTarget(
3070 $this->
ctrl->getLinkTarget(
3074 [
'view',
'delete',
'resetFilter',
'userAction',
''],
3080 if ($this->
access->checkRbacOrPositionPermissionAccess(
3085 $this->tabs_gui->addTarget(
3086 'search_user_extended',
3087 $this->
ctrl->getLinkTargetByClass(
3088 'ilRepositorySearchGUI',
3092 'ilrepositorysearchgui',
3097 if ($this->rbac_system->checkAccess(
3099 $this->object->getRefId()
3101 $this->tabs_gui->addTarget(
3103 $this->
ctrl->getLinkTarget(
3108 'askForUserPasswordReset',
3109 'forceUserPasswordReset',
3112 'listUserDefinedField',
3117 $this->tabs_gui->addTarget(
3119 $this->
ctrl->getLinkTarget(
3129 if ($this->rbac_system->checkAccess(
3131 $this->object->getRefId()
3133 $this->tabs_gui->addTarget(
3135 $this->
ctrl->getLinkTargetByClass(
3136 [get_class($this),
'ilpermissiongui'],
3139 [
'perm',
'info',
'owner'],
3149 $this->tabs_gui->addSubTabTarget(
3151 $this->
ctrl->getLinkTarget(
3158 $this->tabs_gui->addSubTabTarget(
3160 $this->
ctrl->getLinkTarget(
3164 [
'settings',
'saveGlobalUserSettings'],
3167 $this->tabs_gui->addSubTabTarget(
3168 'user_defined_fields',
3169 $this->
ctrl->getLinkTargetByClass(
3170 'ilcustomuserfieldsgui',
3171 'listUserDefinedFields' 3173 'listUserDefinedFields',
3176 $this->tabs_gui->addSubTabTarget(
3177 'user_new_account_mail',
3178 $this->
ctrl->getLinkTarget(
3186 $this->tabs_gui->addSubTabTarget(
3188 $this->
ctrl->getLinkTargetByClass(
3189 'iluserstartingpointgui',
3196 $this->tabs_gui->addSubTabTarget(
3197 'user_profile_info',
3198 $this->
ctrl->getLinkTargetByClass(
3210 public static function _goto(
string $a_user): void
3214 $a_user = (
int) $a_user;
3215 $main_tpl = $DIC->ui()->mainTemplate();
3217 $ilAccess = $DIC[
'ilAccess'];
3220 $ctrl = $DIC[
'ilCtrl'];
3224 if ($ilAccess->checkAccess(
3229 $ctrl->
redirectToURL(
'ilias.php?baseClass=ilAdministrationGUI&ref_id=' . $a_target .
'&jmpToUser=' . $a_user);
3232 if ($ilAccess->checkAccess(
3237 $main_tpl->setOnScreenMessage(
'failure', sprintf(
3238 $lng->
txt(
'msg_no_perm_read_item'),
3245 $lng->
txt(
'msg_no_perm_read'),
3255 $jump_to_user = $this->user_request->getJumpToUser();
3257 $this->
ctrl->setParameterByClass(
3262 $this->
ctrl->redirectByClass(
3272 $a_user_ids = $this->
access->filterUserIdsByPositionOfCurrentUser(
3289 if (!count($a_usr_ids)) {
3290 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
3294 $this->requested_ids = $a_usr_ids;
3297 if (stripos($a_cmd,
'export') !==
false) {
3298 $cmd = $a_cmd .
'Object';
3299 return $this->$cmd();
3312 if ($a_search_form) {
3313 if ($this->rbac_system->checkAccess(
'write', $this->object->getRefId())) {
3315 'activate' => $this->
lng->txt(
'activate'),
3316 'deactivate' => $this->
lng->txt(
'deactivate'),
3317 'accessRestrict' => $this->
lng->txt(
'accessRestrict'),
3318 'accessFree' => $this->
lng->txt(
'accessFree')
3322 if ($this->rbac_system->checkAccess(
'delete', $this->object->getRefId())) {
3323 $cmds[
'delete'] = $this->
lng->txt(
'delete');
3326 if ($this->rbac_system->checkAccess(
'write', $this->object->getRefId())) {
3328 'activateUsers' => $this->
lng->txt(
'activate'),
3329 'deactivateUsers' => $this->
lng->txt(
'deactivate'),
3330 'restrictAccess' => $this->
lng->txt(
'accessRestrict'),
3331 'freeAccess' => $this->
lng->txt(
'accessFree')
3335 if ($this->rbac_system->checkAccess(
'delete', $this->object->getRefId())) {
3336 $cmds[
'deleteUsers'] = $this->
lng->txt(
'delete');
3340 if ($this->rbac_system->checkAccess(
'write', $this->object->getRefId())) {
3342 'userfolder_export_excel_x86',
3343 'userfolder_export_csv',
3344 'userfolder_export_xml' 3346 foreach ($export_types as
$type) {
3351 $cmd = array_pop($cmd);
3352 $cmds[
'usrExport' . ucfirst($cmd)] = $this->
lng->txt(
'export') .
' - ' .
3353 $this->
lng->txt($type);
3359 if ($this->rbac_system->checkAccess(
3361 $mail->getMailObjectReferenceId()
3363 $cmds[
'mail'] = $this->
lng->txt(
'send_mail');
3366 $cmds[
'addToClipboard'] = $this->
lng->txt(
'clipboard_add_btn');
3375 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
3376 $this->
ctrl->redirect(
3383 $this->
object->buildExportFile(
3387 $this->
ctrl->redirectByClass(
3388 'ilobjuserfoldergui',
3392 $fullname = $this->
object->buildExportFile(
3398 $fullname .
'.xlsx',
3411 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
3412 $this->
ctrl->redirect(
3419 $this->
object->buildExportFile(
3423 $this->
ctrl->redirectByClass(
3424 'ilobjuserfoldergui',
3428 $fullname = $this->
object->buildExportFile(
3447 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
3448 $this->
ctrl->redirect(
3454 $this->
object->buildExportFile(
3458 $this->
ctrl->redirectByClass(
3459 'ilobjuserfoldergui',
3463 $fullname = $this->
object->buildExportFile(
3482 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
3483 $this->
ctrl->redirect(
3492 $old_lists->deleteTemporaryLists();
3497 $list->setTitle(
'-TEMPORARY SYSTEM LIST-');
3498 $list->setDescription(
'-USER ACCOUNTS MAIL-');
3499 $list->setCreatedate(date(
'Y-m-d H:i:s'));
3501 $list_id = $list->getId();
3505 $list->assignUser((
int) $user_id);
3511 $umail->persistToStage(
3512 $mail_data[
'user_id'],
3513 $mail_data[
'attachments'],
3514 '#il_ml_' . $list_id,
3515 $mail_data[
'rcp_cc'],
3516 $mail_data[
'rcp_bcc'],
3517 $mail_data[
'm_subject'],
3518 $mail_data[
'm_message'],
3519 $mail_data[
'use_placeholders'],
3520 $mail_data[
'tpl_ctx_id'],
3521 $mail_data[
'tpl_ctx_params']
3524 $this->
ctrl->redirectToURL(
3529 [
'type' =>
'search_res']
3536 switch ($a_form_id) {
3543 'ps_password_change_on_first_login_enabled' => [
3544 $security->isPasswordChangeOnFirstLoginEnabled(),
3547 'ps_password_must_not_contain_loginame' => [
3548 $security->getPasswordMustNotContainLoginnameStatus(),
3551 'ps_password_chars_and_numbers_enabled' => [
3552 $security->isPasswordCharsAndNumbersEnabled(),
3555 'ps_password_special_chars_enabled' => [
3556 $security->isPasswordSpecialCharsEnabled(),
3559 'ps_password_min_length' => $security->getPasswordMinLength(),
3560 'ps_password_max_length' => $security->getPasswordMaxLength(),
3561 'ps_password_uppercase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
3562 'ps_password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
3563 'ps_password_max_age' => $security->getPasswordMaxAge()
3565 $fields[
'ps_password_settings'] = [
null,
null, $subitems];
3568 'ps_login_max_attempts' => $security->getLoginMaxAttempts(),
3569 'ps_prevent_simultaneous_logins' => [
3570 $security->isPreventionOfSimultaneousLoginsEnabled(),
3574 $fields[
'ps_security_protection'] = [
null,
null, $subitems];
3576 return [[
'generalSettings', $fields]];
3584 $this->
ctrl->redirect(
3590 $this->
ctrl->redirectByClass(
3599 if (!count($users)) {
3600 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
3601 $this->
ctrl->redirect(
3610 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'clipboard_user_added'),
true);
3611 $this->
ctrl->redirect(
3620 $checkbox->setInfo($this->
lng->txt($name .
'_desc'));
3621 $checkbox->setValue(
'1');
3628 if (!$this->
access->checkRbacOrPositionPermissionAccess(
3633 $this->
ilias->raiseError(
3634 $this->
lng->txt(
'permission_denied'),
3635 $this->
ilias->error_obj->MESSAGE
static _getAllUserIds(int $a_filter=0)
showFieldChangeComponentsListeningConfirmDialog(array $interested_change_listeners)
static get(string $a_var)
askForUserPasswordResetObject()
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
searchUserAccessFilterCallable(array $a_user_ids)
static _writeNewAccountMail(string $a_lang, string $a_subject, string $a_sal_g, string $a_sal_f, string $a_sal_m, string $a_body)
importUsersObject()
Import Users with new form implementation.
__buildUserFilterSelect()
build select form to distinguish between active and non-active users
static _saveStatus(string $a_key, bool $a_enabled)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static getLogger(string $a_component_id)
Get component logger.
raiseErrorOnMissingWrite()
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
forceUserPasswordResetObject()
setUserOwnerId(int $a_id)
static _isSearchable(string $a_key)
Singleton class that stores all security settings.
prepareOutput(bool $show_sub_objects=true)
final const int MODE_TEMPORARY
Interface Observer Contains several chained tasks and infos about them.
cancelSearchActionObject()
importUserRoleAssignmentObject()
display form for user import with new FileSystem implementation
UserGUIRequest $user_request
initFormGeneralSettings()
isPasswordCharsAndNumbersEnabled()
get boolean if the passwords have to contain characters and numbers
settingsObject()
Global user settings Allows to define global settings for user accounts Note: The Global user setting...
getFullname(int $a_max_strlen=0)
getUserMultiCommands(bool $a_search_form=false)
getPasswordPolicySettingsMap(\ilSecuritySettings $security)
static _updateAccountMailAttachment(string $a_lang, string $a_tmp_name, string $a_name)
Update account mail attachment.
filterUserIdsByRbacOrPositionOfCurrentUser(array $user_ids)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
checkUserManipulationAccessBool()
static _reset()
Reset all.
newAccountMailObject(?ilPropertyFormGUI $form=null)
showActionConfirmation(string $action, bool $a_from_search=false)
confirmaccessRestrictObject()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
getPasswordMaxLength()
get the maximum length for passwords
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
setValue(string $a_value)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getActionUserIds()
Get selected items for table action.
confirmaccessFreeObject()
getPasswordNumberOfLowercaseChars()
Returns number of lowercase characters required.
TableGUI class for user administration.
initUserRoleAssignmentForm(string $xml_file_full_path)
Class ilCustomUserFieldsGUI.
const ORG_OP_EDIT_USER_ACCOUNTS
confirmUsrFieldChangeListenersObject()
getPasswordNumberOfUppercaseChars()
Returns number of uppercase characters required.
const int DEFAULT_ALLOW_CLIENT_MAINTENANCE
static _goto(string $a_user)
ilGlobalTemplateInterface $tpl
static _lookupTitle(int $obj_id)
saveGeneralSettingsObject()
Save user account settings.
static _lookupNewAccountMail(string $a_lang)
searchResultHandler(array $a_usr_ids, string $a_cmd)
Handles multi command from repository search gui.
static _getUserFolderId()
Class ilUserStartingPointGUI.
confirmDeleteExportFileObject()
setVisible(string $field, bool $visible)
Set a profile field being visible.
saveGlobalUserSettingsObject(string $action='')
getTranslationForField(string $field_name, array $properties)
Class InterestedUserFieldChangeListener.
isPasswordSpecialCharsEnabled()
get boolean if the passwords have to contain special characters
getPasswordMinLength()
get the minimum length for passwords
Class ilObjectGUI Basic methods of all Output classes.
cancelDeleteExportFileObject()
setSubTabs(string $a_tab)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class ilObjForumAdministration.
const USER_FIELD_TRANSLATION_MAPPING
static _deleteAccountMailAttachment(string $a_lang)
Delete account mail attachment.
static getDataDir()
get data directory (outside webspace)
addToExternalSettingsForm(int $a_form_id)
confirmdeactivateObject()
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
jumpToUserObject()
Jump to edit screen for user.
setChangeable(string $field, bool $changeable)
Set a profile field being changeable.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
downloadExportFileObject()
Download selected export files Sends a selected export file for download.
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getProtocolAsHTML(string $a_log_title)
Returns the protocol as a HTML table.
getErrorLevel()
Returns the error level.
form( $class_path, string $cmd, string $submit_caption="")
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
addUserObject()
Add new user.
cancelNewAccountMailObject()
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
verifyXmlData(ilUserImportParser $import_parser)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const IL_UPDATE_ON_CONFLICT
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
__construct( $a_data, int $a_id, bool $a_call_by_reference)
const ilPropertyFormGUI $form
redirectToURL(string $target_url)
initAccessRestrictionForm(bool $a_from_search=false)
static _getAssignUsersStatus(int $a_role_id)
static _lookupType(int $id, bool $reference=false)
Class ChangedUserFieldAttribute.
cancelUserFolderActionObject()
bool $usrFieldChangeListenersAccepted
static _getInstance()
Get instance of ilSecuritySettings.
saveNewAccountMailObject()
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
getPasswordMustNotContainLoginnameStatus()
Return whether the password must not contain the loginname or not.
static getInstance(int $a_usr_id)
redirectOnRoleWithMissingWrite(int $role_id, array $roles_of_user, array $global_roles, string $import_dir)
setAccessRestrictionObject(?ilPropertyFormGUI $a_form=null, bool $a_from_search=false)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
const IL_IGNORE_ON_CONFLICT
ilUserSettingsConfig $user_settings_config
addUserAutoCompleteObject()