4require_once
"./Services/Object/classes/class.ilObjectGUI.php";
38 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
44 define(
'USER_FOLDER_ID', 7);
48 $this->lng->loadLanguageModule(
'search');
49 $this->lng->loadLanguageModule(
"user");
51 $ilCtrl->saveParameter($this,
"letter");
60 $this->user_owner_id = $a_id;
64 return $this->user_owner_id ? $this->user_owner_id :
USER_FOLDER_ID;
71 $ilTabs =
$DIC[
'ilTabs'];
74 $next_class = $this->ctrl->getNextClass($this);
75 $cmd = $this->ctrl->getCmd();
78 switch ($next_class) {
79 case 'ilusertablegui':
80 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
82 $u_table->initFilter();
83 $this->ctrl->setReturn($this,
'view');
84 $this->ctrl->forwardCommand($u_table);
87 case 'ilpermissiongui':
88 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
90 $ret = &$this->ctrl->forwardCommand($perm_gui);
93 case 'ilrepositorysearchgui':
96 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
99 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
101 $user_search->setTitle($this->lng->txt(
"search_user_extended"));
102 $user_search->enableSearchableCheck(
false);
103 $user_search->setUserLimitations(
false);
104 $user_search->setCallback(
106 'searchResultHandler',
109 $user_search->addUserAccessFilterCallable(array($this,
"searchUserAccessFilterCallable"));
110 $this->tabs_gui->setTabActive(
'search_user_extended');
111 $this->ctrl->setReturn($this,
'view');
112 $ret = &$this->ctrl->forwardCommand($user_search);
115 case 'ilaccountcodesgui':
116 $this->tabs_gui->setTabActive(
'settings');
118 $ilTabs->activateSubTab(
"account_codes");
119 include_once(
"./Services/User/classes/class.ilAccountCodesGUI.php");
121 $this->ctrl->forwardCommand($acc);
124 case 'ilcustomuserfieldsgui':
125 $this->tabs_gui->setTabActive(
'settings');
127 $ilTabs->activateSubTab(
"user_defined_fields");
128 include_once(
"./Services/User/classes/class.ilCustomUserFieldsGUI.php");
130 $this->ctrl->forwardCommand($cf);
133 case 'iluserstartingpointgui':
134 $this->tabs_gui->setTabActive(
'settings');
136 $ilTabs->activateSubTab(
"starting_points");
137 include_once(
"./Services/User/classes/class.ilUserStartingPointGUI.php");
139 $this->ctrl->forwardCommand($cf);
142 case 'iluserprofileinfosettingsgui':
143 $this->tabs_gui->setTabActive(
'settings');
145 $ilTabs->activateSubTab(
"user_profile_info");
147 $this->ctrl->forwardCommand($ps);
172 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),
$ilErr->WARNING);
182 return $this->access->checkAccess($a_permission,
'', $this->ref_id);
195 if (!
$rbacsystem->checkAccess(
"read", $this->object->getRefId()) ||
198 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
201 include_once
"Services/User/classes/class.ilUserLPTableGUI.php";
202 $tbl =
new ilUserLPTableGUI($this,
"learningProgress", $this->object->getRefId());
204 $tpl->setContent($tbl->getHTML());
213 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
215 $utab->resetOffset();
216 $utab->resetFilter();
231 $ilCtrl->setParameterByClass(
"ilobjusergui",
"new_type",
"usr");
232 $ilCtrl->redirectByClass(array(
"iladministrationgui",
"ilobjusergui"),
"create");
243 $ilTabs =
$DIC[
'ilTabs'];
245 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
247 $utab->resetOffset();
248 $utab->writeFilterToSession();
250 $ilTabs->activateTab(
"usrf");
263 $ilToolbar =
$DIC->toolbar();
269 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
271 if (
$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId()) ||
272 $rbacsystem->checkAccess(
'cat_administrate_users', $this->object->getRefId())) {
274 $button->setCaption(
"usr_add");
275 $button->setUrl($this->ctrl->getLinkTarget($this,
"addUser"));
276 $ilToolbar->addButtonInstance($button);
279 $button->setCaption(
"import_users");
280 $button->setUrl($this->ctrl->getLinkTarget($this,
"importUserForm"));
281 $ilToolbar->addButtonInstance($button);
286 $access->checkRbacOrPositionPermissionAccess(
292 $user_filter =
$access->filterUserIdsByRbacOrPositionOfCurrentUser(
301 if ((
int)
$ilSetting->get(
'user_adm_alpha_nav')) {
302 if (count($ilToolbar->getItems()) > 0) {
303 $ilToolbar->addSeparator();
307 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
309 include_once(
"./Services/User/classes/class.ilObjUser.php");
311 $ai->setParentCommand($this,
"chooseLetter");
312 $ai->setHighlighted(
$_GET[
"letter"]);
313 $ilToolbar->addInputItem($ai,
true);
316 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
318 $utab->addFilterItemValue(
'user_ids', $user_filter);
321 $tpl->setContent($utab->getHTML());
329 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
331 $auto->addUserAccessFilterCallable([$this,
'filterUserIdsByRbacOrPositionOfCurrentUser']);
332 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email',
'second_email'));
333 $auto->enableFieldSearchableCheck(
false);
334 $auto->setMoreLinkAvailable(
true);
336 if (($_REQUEST[
'fetchall'])) {
340 echo $auto->getList($_REQUEST[
'term']);
352 return $access->filterUserIdsByRbacOrPositionOfCurrentUser(
372 $ilCtrl->redirect($this,
"view");
388 $operations = array();
390 if ($this->actions ==
"") {
392 "delete" => array(
"name" =>
"delete",
"lng" =>
"delete"),
393 "activate" => array(
"name" =>
"activate",
"lng" =>
"activate"),
394 "deactivate" => array(
"name" =>
"deactivate",
"lng" =>
"deactivate"),
395 "accessRestrict" => array(
"name" =>
"accessRestrict",
"lng" =>
"accessRestrict"),
396 "accessFree" => array(
"name" =>
"accessFree",
"lng" =>
"accessFree"),
397 "export" => array(
"name" =>
"export",
"lng" =>
"export")
402 foreach (
$d as $row) {
403 if (
$rbacsystem->checkAccess($row[
"name"], $this->object->getRefId())) {
404 $operations[] = $row;
408 if (count($operations) > 0) {
409 $select =
"<select name=\"selectedAction\">\n";
410 foreach ($operations as $val) {
411 $select .=
"<option value=\"" . $val[
"name"] .
"\"";
412 if (strcmp(
$_POST[
"selectedAction"], $val[
"name"]) == 0) {
413 $select .=
" selected=\"selected\"";
416 $select .= $this->lng->txt($val[
"lng"]);
417 $select .=
"</option>";
419 $select .=
"</select>";
420 $this->tpl->setCurrentBlock(
"tbl_action_select");
421 $this->tpl->setVariable(
"SELECT_ACTION", $select);
422 $this->tpl->setVariable(
"BTN_NAME",
"userAction");
423 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"submit"));
424 $this->tpl->parseCurrentBlock();
427 if ($with_subobjects ===
true) {
431 if ((count($operations) > 0) or $subobjs ===
true) {
432 $this->tpl->setCurrentBlock(
"tbl_action_row");
433 $this->tpl->setVariable(
"COLUMN_COUNTS", count($this->data[
"cols"]));
435 $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
436 $this->tpl->parseCurrentBlock();
452 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
454 if (!
$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId())) {
459 foreach (
$d as $row) {
461 if ($row[
"max"] > 0) {
463 for (
$i = 0;
$i < count($this->data[
"ctrl"]);
$i++) {
464 if ($this->data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
469 if ($row[
"max"] ==
"" || $count < $row[
"max"]) {
470 $subobj[] = $row[
"name"];
475 if (is_array($subobj)) {
478 $this->tpl->setCurrentBlock(
"add_object");
479 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
480 $this->tpl->setVariable(
"BTN_NAME",
"create");
481 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
482 $this->tpl->parseCurrentBlock();
492 $this->ctrl->redirect($this,
'view');
497 $this->ctrl->redirectByClass(
'ilrepositorysearchgui',
'showSearchResults');
512 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->WARNING);
519 $obj->setActive(
true,
$ilUser->getId());
524 ilUtil::sendSuccess($this->lng->txt(
"user_activated"),
true);
527 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
529 $this->ctrl->redirect($this,
"view");
545 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->WARNING);
551 $obj->setActive(
false,
$ilUser->getId());
557 ilUtil::sendSuccess($this->lng->txt(
"user_deactivated"),
true);
560 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
562 $this->ctrl->redirect($this,
"view");
577 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->WARNING);
583 $obj->setTimeLimitUnlimited(1);
584 $obj->setTimeLimitFrom(
"");
585 $obj->setTimeLimitUntil(
"");
586 $obj->setTimeLimitMessage(0);
592 ilUtil::sendSuccess($this->lng->txt(
"access_free_granted"),
true);
595 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
597 $this->ctrl->redirect($this,
"view");
606 $this->tpl->setContent($a_form->getHTML());
624 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
626 $form->setTitle($this->lng->txt(
"time_limit_add_time_limit_for_selected"));
627 $form->setFormAction($this->ctrl->getFormAction($this,
"confirmaccessRestrict"));
630 $from->setShowTime(
true);
631 $from->setRequired(
true);
632 $form->addItem($from);
635 $to->setRequired(
true);
636 $to->setShowTime(
true);
639 $form->addCommandButton(
"confirmaccessRestrict", $this->lng->txt(
"confirm"));
640 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
642 foreach ($user_ids as $user_id) {
644 $ufield->setValue($user_id);
645 $form->addItem($ufield);
649 if ($a_from_search ||
$_POST[
"frsrch"]) {
652 $form->addItem($field);
670 if (!$form->checkInput()) {
674 $timefrom = $form->getItemByPostVar(
"from")->getDate()->get(
IL_CAL_UNIX);
675 $timeuntil = $form->getItemByPostVar(
"to")->getDate()->get(
IL_CAL_UNIX);
676 if ($timeuntil <= $timefrom) {
683 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->WARNING);
688 $obj->setTimeLimitUnlimited(0);
689 $obj->setTimeLimitFrom($timefrom);
690 $obj->setTimeLimitUntil($timeuntil);
691 $obj->setTimeLimitMessage(0);
695 ilUtil::sendSuccess($this->lng->txt(
"access_restricted"),
true);
698 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
700 $this->ctrl->redirect($this,
"view");
718 if (!
$rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
720 $ilCtrl->redirect($this,
"view");
724 $this->
ilias->raiseError($this->lng->txt(
"msg_no_delete_yourself"), $this->ilias->error_obj->WARNING);
728 foreach (
$_POST[
"id"] as $id) {
730 $obj = &$this->
ilias->obj_factory->getInstanceByObjId($id);
735 ilUtil::sendSuccess($this->lng->txt(
"user_deleted"),
true);
738 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
740 $this->ctrl->redirect($this,
"view");
754 if (
$_POST[
"select_cmd_all"]) {
755 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
759 $access->checkRbacOrPositionPermissionAccess(
765 $filtered_users =
$access->filterUserIdsByRbacOrPositionOfCurrentUser(
772 $utab->addFilterItemValue(
"user_ids", $filtered_users);
775 return $utab->getUserIdsForFilter();
777 return $access->filterUserIdsByRbacOrPositionOfCurrentUser(
795 return $access->checkRbacOrPositionPermissionAccess(
809 $ilTabs =
$DIC[
'ilTabs'];
813 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
816 if (!$a_from_search) {
817 $ilTabs->activateTab(
"obj_usrf");
819 $ilTabs->activateTab(
"search_user_extended");
822 if (strcmp($action,
"accessRestrict") == 0) {
825 if (strcmp($action,
"mail") == 0) {
831 if (!$a_from_search) {
832 $cancel =
"cancelUserFolderAction";
834 $cancel =
"cancelSearchAction";
838 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
840 $cgui->setFormAction($this->ctrl->getFormAction($this));
841 $cgui->setHeaderText($this->lng->txt(
"info_" . $action .
"_sure"));
842 $cgui->setCancel($this->lng->txt(
"cancel"), $cancel);
843 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirm" . $action);
845 if ($a_from_search) {
846 $cgui->addHiddenItem(
"frsrch", 1);
849 foreach ($user_ids as $id) {
854 $login = $this->lng->txt(
"never");
859 $caption =
$user->getFullname() .
" (" .
$user->getLogin() .
")" .
", " .
860 $user->getEmail() .
" - " . $this->lng->txt(
"last_login") .
": " .
$login;
862 $cgui->addItem(
"id[]", $id, $caption);
865 $this->tpl->setContent($cgui->getHTML());
875 $_POST[
"selectedAction"] =
"delete";
884 $_POST[
"selectedAction"] =
"activate";
893 $_POST[
"selectedAction"] =
"deactivate";
902 $_POST[
"selectedAction"] =
"accessRestrict";
911 $_POST[
"selectedAction"] =
"accessFree";
932 $this->tabs_gui->clearTargets();
933 $this->tabs_gui->setBackTarget($this->lng->txt(
'usrf'),
$ilCtrl->getLinkTarget($this,
'view'));
936 !
$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId()) &&
937 !
$access->checkAccess(
'cat_administrate_users',
'', $this->object->getRefId())
939 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
943 $tpl->setContent($this->form->getHTML());
958 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
962 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
964 $fi->setSuffixes(array(
"xml",
"zip"));
965 $fi->setRequired(
true);
968 $this->form->addItem($fi);
970 $this->form->addCommandButton(
"importUserRoleAssignment",
$lng->txt(
"import"));
971 $this->form->addCommandButton(
"importCancelled",
$lng->txt(
"cancel"));
973 $this->form->setTitle(
$lng->txt(
"import_users"));
974 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
985 $filesystem =
$DIC->filesystem()->storage();
989 if ($filesystem->hasDir($import_dir)) {
990 $filesystem->deleteDir($import_dir);
993 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui') {
994 $this->ctrl->redirect($this,
"view");
996 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1012 $importDir =
'user_import/usr_' .
$ilUser->getId() .
'_' . session_id();
1027 $renderer =
$DIC->ui()->renderer();
1030 $this->tabs_gui->clearTargets();
1031 $this->tabs_gui->setBackTarget($this->lng->txt(
'usrf'),
$ilCtrl->getLinkTarget($this,
'view'));
1034 if ($this->form->checkInput()) {
1041 $tpl->setContent($renderer->render($form));
1043 $this->form->setValuesByPost();
1044 $tpl->setContent($this->form->getHtml());
1055 $ui =
$DIC->ui()->factory();
1058 $importParser->startParsing();
1062 $xml_file_name = explode(
"/", $xml_file_full_path);
1063 $roles_import_filename = $ui->input()->field()->text($this->lng->txt(
"import_file"))
1064 ->withDisabled(
true)
1065 ->withValue(end($xml_file_name));
1068 $roles_import_count = $ui->input()->field()->numeric($this->lng->txt(
"num_users"))
1069 ->withDisabled(
true)
1070 ->withValue($importParser->getUserCount());
1073 $importParser->startParsing();
1075 $roles = $importParser->getCollectedRoles();
1078 $all_gl_roles =
$rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
1079 $gl_roles = array();
1081 foreach ($all_gl_roles as $obj_data) {
1089 if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID) {
1091 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID, $roles_of_user)) {
1092 $gl_roles[$obj_data[
"obj_id"]] = $obj_data[
"title"];
1098 $got_globals =
false;
1099 $global_selects = array();
1100 foreach ($roles as $role_id => $role) {
1101 if ($role[
"type"] ==
"Global") {
1102 if (!$got_globals) {
1103 $got_globals =
true;
1105 $global_roles_assignment_info = $ui->input()->field()->text($this->lng->txt(
"roles_of_import_global"))
1106 ->withDisabled(
true)
1107 ->withValue($this->lng->txt(
"assign_global_role"));
1111 $select_options = array();
1112 foreach ($gl_roles as $key => $value) {
1113 $select_options[$role_id .
"-" . $key] = $value;
1117 $pre_select = array_search($role[
"name"], $select_options);
1119 switch ($role[
"name"]) {
1120 case "Administrator":
1121 $pre_select = array_search(
"Administrator", $select_options);
1125 $pre_select = array_search(
"User", $select_options);
1129 $pre_select = array_search(
"User", $select_options);
1133 $pre_select = array_search(
"Guest", $select_options);
1137 $pre_select = array_search(
"User", $select_options);
1142 $select = $ui->input()->field()->select($role[
"name"], $select_options)
1143 ->withValue($pre_select)
1144 ->withRequired(
true);
1145 array_push($global_selects, $select);
1150 $got_locals =
false;
1151 foreach ($roles as $role_id => $role) {
1152 if ($role[
"type"] ==
"Local") {
1159 $local_roles_assignment_info = $ui->input()->field()->text($this->lng->txt(
"roles_of_import_local"))
1160 ->withDisabled(
true)
1161 ->withValue($this->lng->txt(
"assign_local_role"));
1171 $loc_roles = array();
1174 foreach ($roles as $role_id => $role) {
1175 if ($role[
"type"] ==
"Local") {
1176 $searchName = (substr($role[
'name'], 0, 1) ==
'#') ? $role[
'name'] :
'#' . $role[
'name'];
1177 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1178 foreach ($matching_role_ids as $mid) {
1179 if (!in_array($mid, $loc_roles)) {
1180 $loc_roles[] = $mid;
1189 $loc_roles =
$rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1194 $l_roles_mailbox_searcharray = array();
1195 foreach ($loc_roles as $key => $loc_role) {
1197 $rolf =
$rbacreview->getFoldersAssignedToRole($loc_role,
true);
1206 $rolf[0] != ROLE_FOLDER_ID
1218 $path_array = array();
1219 if ($this->tree->isInTree($rolf[0])) {
1222 $tmpPath = $this->tree->getPathFull($rolf[0]);
1223 $tmpPath[] = $rolf[0];
1225 for (
$i = 1,
$n = count($tmpPath) - 1;
$i <
$n;
$i++) {
1226 if ($i < 3 || $i >
$n - 3) {
1227 $path_array[] = $tmpPath[
$i][
'title'];
1228 } elseif (
$i == 3 ||
$i ==
$n - 3) {
1229 $path_array[] =
'...';
1232 $isInSubtree |= $tmpPath[
$i][
'obj_id'] == $this->
object->getId();
1235 $path = implode(
" < ", array_reverse($path_array));
1237 $path =
"<b>Rolefolder " . $rolf[0] .
" not found in tree! (Role " . $loc_role .
")</b>";
1239 $roleMailboxAddress = (new \ilRoleMailboxAddress($loc_role))->value();
1240 $l_roles[$loc_role] = $roleMailboxAddress .
', ' . $path;
1244 natcasesort($l_roles);
1245 $l_roles[
"ignore"] = $this->lng->txt(
"usrimport_ignore_role");
1248 $local_selects = [];
1249 foreach ($roles as $role_id => $role) {
1250 if ($role[
"type"] ==
"Local") {
1253 $searchName = (substr($role[
'name'], 0, 1) ==
'#') ? $role[
'name'] :
'#' . $role[
'name'];
1254 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1255 $pre_select = count($matching_role_ids) == 1 ? $role_id .
"-" . $matching_role_ids[0] :
"ignore";
1257 $selectable_roles = [];
1262 $selectable_roles[
"ignore"] = $this->lng->txt(
"usrimport_ignore_role");
1263 foreach ($matching_role_ids as $id) {
1264 $selectable_roles[$role_id .
"-" . $id] = $l_roles[$id];
1267 foreach ($l_roles as $local_role_id => $value) {
1268 if ($local_role_id !==
"ignore") {
1269 $selectable_roles[$role_id .
"-" . $local_role_id] = $value;
1274 if (count($selectable_roles) > 0) {
1275 $select = $ui->input()->field()
1276 ->select($role[
"name"], $selectable_roles)
1277 ->withRequired(
true);
1278 if (array_key_exists($pre_select, $selectable_roles)) {
1279 $select = $select->withValue($pre_select);
1281 $local_selects[] = $select;
1293 $conflict_action_select = $ui->input()->field()->select($this->lng->txt(
"conflict_handling"), $handlers, str_replace(
'\n',
'<br>', $this->lng->txt(
"usrimport_conflict_handling_info")))
1295 ->withRequired(
true);
1298 $this->lng->loadLanguageModule(
"mail");
1300 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"") {
1301 $send_checkbox = $ui->input()->field()->checkbox($this->lng->txt(
"user_send_new_account_mail"))
1304 $mail_section = $ui->input()->field()->section([$send_checkbox], $this->lng->txt(
"mail_account_mail"));
1307 $file_info_section = $ui->input()->field()->section(
1309 "filename" => $roles_import_filename,
1310 "import_count" => $roles_import_count,
1312 $this->lng->txt(
"file_info")
1315 $form_action =
$DIC->ctrl()->getFormActionByClass(
'ilObjUserFolderGui',
'importUsers');
1318 "file_info" => $file_info_section
1321 if (!empty($global_selects)) {
1322 $global_role_info_section = $ui->input()
1324 ->section([$global_roles_assignment_info], $this->lng->txt(
"global_role_assignment"));
1325 $global_role_selection_section = $ui->input()->field()->section($global_selects,
"");
1326 $form_elements[
"global_role_info"] = $global_role_info_section;
1327 $form_elements[
"global_role_selection"] = $global_role_selection_section;
1331 if (!empty($local_selects)) {
1332 $local_role_info_section = $ui->input()->field()->section([$local_roles_assignment_info], $this->lng->txt(
"local_role_assignment"));
1333 $local_role_selection_section = $ui->input()->field()->section($local_selects,
"");
1335 $form_elements[
"local_role_info"] = $local_role_info_section;
1336 $form_elements[
"local_role_selection"] = $local_role_selection_section;
1339 $form_elements[
"conflict_action"] = $ui->input()->field()->section([$conflict_action_select],
"");
1341 if (!empty($mail_section)) {
1342 $form_elements[
"send_mail"] = $mail_section;
1345 return $ui->input()->container()->form()->standard(
1360 $upload =
$DIC->upload();
1362 $filesystem =
$DIC->filesystem()->storage();
1365 if (!$upload->hasBeenProcessed()) {
1370 if ($filesystem->hasDir($import_dir)) {
1371 $filesystem->deleteDir($import_dir);
1373 $filesystem->createDir($import_dir);
1376 foreach ($upload->getResults() as $single_file_upload) {
1377 $file_name = $single_file_upload->getName();
1378 $parts = pathinfo($file_name);
1381 if ($single_file_upload->getStatus() != \
ILIAS\FileUpload\DTO\ProcessingStatus::OK) {
1382 $filesystem->deleteDir($import_dir);
1383 $this->
ilias->raiseError($this->lng->txt(
"no_import_file_found"), $this->ilias->error_obj->MESSAGE);
1387 $upload->moveFilesTo(
1389 \
ILIAS\FileUpload\Location::STORAGE
1393 if ($single_file_upload->getMimeType() ==
"application/zip") {
1399 $file_list = $filesystem->listContents($import_dir);
1401 foreach ($file_list as $key => $a_file) {
1402 if (substr($a_file->getPath(), -4) ==
'.xml') {
1403 unset($file_list[$key]);
1404 $xml_file = $a_file->getPath();
1410 foreach ($file_list as $a_file) {
1411 $filesystem->delete($a_file->getPath());
1414 if (is_null($xml_file)) {
1415 $subdir = basename($parts[
"basename"],
"." . $parts[
"extension"]);
1416 $xml_file = $import_dir .
"/" . $subdir .
"/" . $subdir .
".xml";
1421 $a = $filesystem->listContents($import_dir);
1423 $xml_file = $file->getPath();
1427 if (!$filesystem->has($xml_file)) {
1428 $filesystem->deleteDir($import_dir);
1429 $this->
ilias->raiseError($this->lng->txt(
"no_xml_file_found_in_zip")
1430 .
" " . $subdir .
"/" . $subdir .
".xml", $this->ilias->error_obj->MESSAGE);
1441 $filesystem =
$DIC->filesystem()->storage();
1444 switch ($importParser->getErrorLevel()) {
1448 $this->tpl->setVariable(
"IMPORT_LOG", $importParser->getProtocolAsHTML($this->lng->txt(
"verification_warning_log")));
1451 $filesystem->deleteDir($import_dir);
1452 $this->
ilias->raiseError(
1453 $this->lng->txt(
"verification_failed") . $importParser->getProtocolAsHTML($this->lng->txt(
"verification_failure_log")),
1454 $this->ilias->error_obj->MESSAGE
1468 $request =
$DIC->http()->request();
1471 $filesystem =
$DIC->filesystem()->storage();
1475 $file_list = $filesystem->listContents($import_dir);
1478 if (count($file_list) > 1) {
1479 $filesystem->deleteDir($import_dir);
1480 $this->
ilias->raiseError(
1481 $this->lng->txt(
"usrimport_wrong_file_count"),
1482 $this->ilias->error_obj->MESSAGE
1484 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
1485 $this->ctrl->redirect($this,
"view");
1487 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1490 $xml_file = $file_list[0]->getPath();
1498 if ($request->getMethod() ==
"POST") {
1502 $this->
ilias->raiseError(
1503 $this->lng->txt(
"usrimport_form_not_evaluabe"),
1504 $this->ilias->error_obj->MESSAGE
1506 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
1507 $this->ctrl->redirect($this,
"view");
1509 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1513 $rule =
$result[
"conflict_action"][0];
1516 $roles = isset(
$result[
"local_role_selection"]) ? array_merge(
$result[
"global_role_selection"],
$result[
"local_role_selection"]) :
$result[
"global_role_selection"];
1518 $role_assignment = array();
1519 foreach ($roles as $value) {
1520 $keys = explode(
"-", $value);
1530 if (!empty($role_assignment)) {
1533 foreach ($role_assignment as $role_id) {
1534 if ($role_id !=
"") {
1535 if (in_array($role_id, $global_roles)) {
1536 if (!in_array(SYSTEM_ROLE_ID, $roles_of_user)) {
1537 if ($role_id == SYSTEM_ROLE_ID && !in_array(SYSTEM_ROLE_ID, $roles_of_user)
1541 $filesystem->deleteDir($import_dir);
1542 $this->
ilias->raiseError(
1543 $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1544 $this->ilias->error_obj->MESSAGE
1549 $rolf =
$rbacreview->getFoldersAssignedToRole($role_id,
true);
1551 || !
$rbacsystem->checkAccess(
'write', $rolf[0])) {
1552 $filesystem->deleteDir($import_dir);
1553 $this->
ilias->raiseError(
1554 $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1555 $this->ilias->error_obj->MESSAGE
1564 if (isset(
$result[
'send_mail'])) {
1565 $importParser->setSendMail(
$result[
'send_mail'][0]);
1568 $importParser->setRoleAssignment($role_assignment);
1569 $importParser->startParsing();
1572 $filesystem->deleteDir($import_dir);
1574 switch ($importParser->getErrorLevel()) {
1576 ilUtil::sendSuccess($this->lng->txt(
"user_imported"),
true);
1579 ilUtil::sendSuccess($this->lng->txt(
"user_imported_with_warnings") . $importParser->getProtocolAsHTML($this->lng->txt(
"import_warning_log")),
true);
1582 $this->
ilias->raiseError(
1583 $this->lng->txt(
"user_import_failed")
1584 . $importParser->getProtocolAsHTML($this->lng->txt(
"import_failure_log")),
1585 $this->ilias->error_obj->MESSAGE
1590 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
1591 $this->ctrl->redirect($this,
"view");
1594 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1600 parent::hitsperpageObject();
1616 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1619 $show_blocking_time_in_days =
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
1620 $show_blocking_time_in_days = (float) $show_blocking_time_in_days;
1622 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1626 'lua' => $aset->isLocalUserAdministrationEnabled(),
1627 'lrua' => $aset->isUserAccessRestricted(),
1628 'allow_change_loginname' => (bool)
$ilSetting->get(
'allow_change_loginname'),
1629 'create_history_loginname' => (bool)
$ilSetting->get(
'create_history_loginname'),
1630 'reuse_of_loginnames' => (bool)
$ilSetting->get(
'reuse_of_loginnames'),
1631 'loginname_change_blocking_time' => (float) $show_blocking_time_in_days,
1632 'user_adm_alpha_nav' => (
int)
$ilSetting->get(
'user_adm_alpha_nav'),
1634 'user_reactivate_code' => (int)
$ilSetting->get(
'user_reactivate_code'),
1635 'user_own_account' => (int)
$ilSetting->get(
'user_delete_own_account'),
1636 'user_own_account_email' =>
$ilSetting->get(
'user_delete_own_account_email'),
1639 'session_reminder_enabled' =>
$ilSetting->get(
'session_reminder_enabled'),
1643 'session_max_idle_after_first_request' =>
$ilSetting->get(
1644 'session_max_idle_after_first_request',
1648 'login_max_attempts' => $security->getLoginMaxAttempts(),
1649 'ps_prevent_simultaneous_logins' => (int) $security->isPreventionOfSimultaneousLoginsEnabled(),
1650 'password_assistance' => (bool)
$ilSetting->get(
"password_assistance"),
1651 'letter_avatars' => (int)
$ilSetting->get(
'letter_avatars'),
1652 'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1653 'password_max_age' => $security->getPasswordMaxAge()
1657 $this->form->setValuesByArray(array_merge(
1659 $passwordPolicySettings,
1660 [
'pw_policy_hash' => md5(implode(
'', $passwordPolicySettings))]
1663 $this->tpl->setContent($this->form->getHTML());
1697 if ($this->form->checkInput()) {
1700 if (!strlen($this->form->getInput(
'loginname_change_blocking_time'))) {
1702 $this->form->getItemByPostVar(
'loginname_change_blocking_time')
1703 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
1706 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1710 $security->setPasswordCharsAndNumbersEnabled((
bool)
$_POST[
"password_chars_and_numbers_enabled"]);
1711 $security->setPasswordSpecialCharsEnabled((
bool)
$_POST[
"password_special_chars_enabled"]);
1712 $security->setPasswordMinLength((
int)
$_POST[
"password_min_length"]);
1713 $security->setPasswordMaxLength((
int)
$_POST[
"password_max_length"]);
1714 $security->setPasswordNumberOfUppercaseChars((
int)
$_POST[
'password_ucase_chars_num']);
1715 $security->setPasswordNumberOfLowercaseChars((
int)
$_POST[
'password_lowercase_chars_num']);
1716 $security->setPasswordMaxAge((
int)
$_POST[
"password_max_age"]);
1717 $security->setLoginMaxAttempts((
int)
$_POST[
"login_max_attempts"]);
1718 $security->setPreventionOfSimultaneousLogins((
bool)
$_POST[
'ps_prevent_simultaneous_logins']);
1719 $security->setPasswordChangeOnFirstLoginEnabled((
bool)
$_POST[
'password_change_on_first_login_enabled']);
1720 $security->setPasswordMustNotContainLoginnameStatus((
int)
$_POST[
'password_must_not_contain_loginame']);
1722 if (!$security->validate($this->form)) {
1729 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1734 $ilSetting->set(
'allow_change_loginname', (
int) $this->form->getInput(
'allow_change_loginname'));
1735 $ilSetting->set(
'create_history_loginname', (
int) $this->form->getInput(
'create_history_loginname'));
1736 $ilSetting->set(
'reuse_of_loginnames', (
int) $this->form->getInput(
'reuse_of_loginnames'));
1737 $save_blocking_time_in_seconds = (int) ($this->form->getInput(
'loginname_change_blocking_time') * 86400);
1738 $ilSetting->set(
'loginname_change_blocking_time', (
int) $save_blocking_time_in_seconds);
1739 $ilSetting->set(
'user_adm_alpha_nav', (
int) $this->form->getInput(
'user_adm_alpha_nav'));
1740 $ilSetting->set(
'user_reactivate_code', (
int) $this->form->getInput(
'user_reactivate_code'));
1742 $ilSetting->set(
'user_delete_own_account', (
int) $this->form->getInput(
'user_own_account'));
1743 $ilSetting->set(
'user_delete_own_account_email', $this->form->getInput(
'user_own_account_email'));
1745 $ilSetting->set(
"password_assistance", $this->form->getInput(
"password_assistance"));
1749 'session_handling_type',
1750 (
int) $this->form->getInput(
'session_handling_type')
1755 'session_reminder_enabled',
1756 $this->form->getInput(
'session_reminder_enabled')
1759 require_once
'Services/Authentication/classes/class.ilSessionControl.php';
1762 'session_allow_client_maintenance',
1767 include_once
"Services/Authentication/classes/class.ilSessionStatistics.php";
1771 'session_max_count',
1772 (
int) $this->form->getInput(
'session_max_count')
1776 (
int) $this->form->getInput(
'session_min_idle')
1780 (
int) $this->form->getInput(
'session_max_idle')
1783 'session_max_idle_after_first_request',
1784 (
int) $this->form->getInput(
'session_max_idle_after_first_request')
1789 $ilSetting->set(
'letter_avatars', (
int) $this->form->getInput(
'letter_avatars'));
1791 $requestPasswordReset =
false;
1792 if ($this->form->getInput(
'pw_policy_hash')) {
1793 $oldSettingsHash = $this->form->getInput(
'pw_policy_hash');
1796 $requestPasswordReset = ($oldSettingsHash !== $currentSettingsHash);
1799 if ($requestPasswordReset) {
1800 $this->ctrl->redirect($this,
'askForUserPasswordReset');
1802 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
1810 $this->form->setValuesByPost();
1811 $this->tpl->setContent($this->form->getHTML());
1820 $this->lng->loadLanguageModule(
'ps');
1822 \ilUtil::sendSuccess($this->lng->txt(
'ps_passwd_policy_change_force_user_reset_succ'),
true);
1823 $this->ctrl->redirect($this,
'generalSettings');
1831 $this->lng->loadLanguageModule(
'ps');
1833 $confirmation = new \ilConfirmationGUI();
1834 $confirmation->setFormAction($this->ctrl->getFormAction($this,
'askForUserPasswordReset'));
1835 $confirmation->setHeaderText($this->lng->txt(
'ps_passwd_policy_changed_force_user_reset'));
1836 $confirmation->setConfirm($this->lng->txt(
'yes'),
'forceUserPasswordReset');
1837 $confirmation->setCancel($this->lng->txt(
'no'),
'generalSettings');
1839 $this->tpl->setContent($confirmation->getHTML());
1854 $this->tabs_gui->setTabActive(
'settings');
1855 $this->tabs_gui->setSubTabActive(
'general_settings');
1857 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1859 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveGeneralSettings'));
1861 $this->form->setTitle($this->lng->txt(
'general_settings'));
1863 $lua =
new ilCheckboxInputGUI($this->lng->txt(
'enable_local_user_administration'),
'lua');
1864 $lua->setInfo($this->lng->txt(
'enable_local_user_administration_info'));
1866 $this->form->addItem($lua);
1869 $lrua->setInfo($this->lng->txt(
'restrict_user_access_info'));
1871 $this->form->addItem($lrua);
1874 $alph =
new ilCheckboxInputGUI($this->lng->txt(
'user_adm_enable_alpha_nav'),
'user_adm_alpha_nav');
1877 $this->form->addItem($alph);
1880 $code =
new ilCheckboxInputGUI($this->lng->txt(
"user_account_code_setting"),
"user_reactivate_code");
1881 $code->setInfo($this->lng->txt(
'user_account_code_setting_info'));
1882 $this->form->addItem($code);
1885 $own =
new ilCheckboxInputGUI($this->lng->txt(
"user_allow_delete_own_account"),
"user_own_account");
1886 $this->form->addItem($own);
1887 $own_email =
new ilEMailInputGUI($this->lng->txt(
"user_delete_own_account_notification_email"),
"user_own_account_email");
1888 $own->addSubItem($own_email);
1900 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"session_reminder"),
"session_reminder_enabled");
1903 $cb->setInfo($this->lng->txt(
"session_reminder_info") .
"<br />" .
1904 sprintf($this->lng->txt(
'session_reminder_session_duration'), $time));
1905 $fixed->addSubItem($cb);
1908 $ssettings->addOption($fixed);
1914 require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
1918 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_count'),
'session_max_count');
1919 $sub_ti->setMaxLength(5);
1920 $sub_ti->setSize(5);
1921 $sub_ti->setInfo($this->lng->txt(
'session_max_count_info'));
1923 $sub_ti->setDisabled(
true);
1925 $ldsh->addSubItem($sub_ti);
1930 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_min_idle'),
'session_min_idle');
1931 $sub_ti->setMaxLength(5);
1932 $sub_ti->setSize(5);
1933 $sub_ti->setInfo($this->lng->txt(
'session_min_idle_info'));
1935 $sub_ti->setDisabled(
true);
1937 $ldsh->addSubItem($sub_ti);
1942 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_idle'),
'session_max_idle');
1943 $sub_ti->setMaxLength(5);
1944 $sub_ti->setSize(5);
1945 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_info'));
1947 $sub_ti->setDisabled(
true);
1949 $ldsh->addSubItem($sub_ti);
1954 $this->lng->txt(
'session_max_idle_after_first_request'),
1955 'session_max_idle_after_first_request'
1957 $sub_ti->setMaxLength(5);
1958 $sub_ti->setSize(5);
1959 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_after_first_request_info'));
1961 $sub_ti->setDisabled(
true);
1963 $ldsh->addSubItem($sub_ti);
1966 $ssettings->addOption($ldsh);
1972 $this->form->addItem($ssettings);
1977 $ti->setValue($this->lng->txt(
'session_config_maintenance_disabled'));
1978 $ssettings->setDisabled(
true);
1979 $ti->addSubItem($ssettings);
1980 $this->form->addItem($ti);
1986 $this->lng->loadLanguageModule(
'ps');
1989 $pass->setTitle($this->lng->txt(
'ps_password_settings'));
1990 $this->form->addItem(
$pass);
1992 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_change_on_first_login_enabled'),
'password_change_on_first_login_enabled');
1993 $check->setInfo($this->lng->txt(
'ps_password_change_on_first_login_enabled_info'));
1994 $this->form->addItem($check);
1996 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1998 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_must_not_contain_loginame'),
'password_must_not_contain_loginame');
1999 $check->setInfo($this->lng->txt(
'ps_password_must_not_contain_loginame_info'));
2000 $this->form->addItem($check);
2002 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_chars_and_numbers_enabled'),
'password_chars_and_numbers_enabled');
2004 $check->setInfo($this->lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
2005 $this->form->addItem($check);
2007 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_special_chars_enabled'),
'password_special_chars_enabled');
2009 $check->setInfo($this->lng->txt(
'ps_password_special_chars_enabled_info'));
2010 $this->form->addItem($check);
2012 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_min_length'),
'password_min_length');
2013 $text->setInfo($this->lng->txt(
'ps_password_min_length_info'));
2015 $text->setMaxLength(2);
2016 $this->form->addItem($text);
2018 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_max_length'),
'password_max_length');
2019 $text->setInfo($this->lng->txt(
'ps_password_max_length_info'));
2021 $text->setMaxLength(3);
2022 $this->form->addItem($text);
2024 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_uppercase_chars_num'),
'password_ucase_chars_num');
2025 $text->setInfo($this->lng->txt(
'ps_password_uppercase_chars_num_info'));
2026 $text->setMinValue(0);
2028 $text->setMaxLength(3);
2029 $this->form->addItem($text);
2031 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_lowercase_chars_num'),
'password_lowercase_chars_num');
2032 $text->setInfo($this->lng->txt(
'ps_password_lowercase_chars_num_info'));
2033 $text->setMinValue(0);
2035 $text->setMaxLength(3);
2036 $this->form->addItem($text);
2038 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_max_age'),
'password_max_age');
2039 $text->setInfo($this->lng->txt(
'ps_password_max_age_info'));
2041 $text->setMaxLength(3);
2042 $this->form->addItem($text);
2045 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"enable_password_assistance"),
"password_assistance");
2046 $cb->setInfo($this->lng->txt(
"password_assistance_info"));
2047 $this->form->addItem($cb);
2050 $pass->setTitle($this->lng->txt(
'ps_security_protection'));
2051 $this->form->addItem(
$pass);
2053 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_login_max_attempts'),
'login_max_attempts');
2054 $text->setInfo($this->lng->txt(
'ps_login_max_attempts_info'));
2056 $text->setMaxLength(2);
2057 $this->form->addItem($text);
2060 $objCb =
new ilCheckboxInputGUI($this->lng->txt(
'ps_prevent_simultaneous_logins'),
'ps_prevent_simultaneous_logins');
2061 $objCb->setValue(1);
2062 $objCb->setInfo($this->lng->txt(
'ps_prevent_simultaneous_logins_info'));
2063 $this->form->addItem($objCb);
2069 $log->setTitle($this->lng->txt(
'loginname_settings'));
2070 $this->form->addItem(
$log);
2072 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
2073 $chbChangeLogin->setValue(1);
2074 $this->form->addItem($chbChangeLogin);
2075 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
2076 $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
2077 $chbCreateHistory->setValue(1);
2079 $chbChangeLogin->addSubItem($chbCreateHistory);
2080 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
2081 $chbReuseLoginnames->setValue(1);
2082 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2084 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2085 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
2086 $chbChangeBlockingTime->allowDecimals(
true);
2087 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
2088 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
2089 $chbChangeBlockingTime->setSize(10);
2090 $chbChangeBlockingTime->setMaxLength(10);
2091 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2093 $la =
new ilCheckboxInputGUI($this->lng->txt(
'usr_letter_avatars'),
'letter_avatars');
2095 $la->setInfo($this->lng->txt(
'usr_letter_avatars_info'));
2096 $this->form->addItem($la);
2098 $passwordPolicySettingsHash = new \ilHiddenInputGUI(
'pw_policy_hash');
2099 $this->form->addItem($passwordPolicySettingsHash);
2101 $this->form->addCommandButton(
'saveGeneralSettings', $this->lng->txt(
'save'));
2123 $ilias =
$DIC[
'ilias'];
2124 $ilTabs =
$DIC[
'ilTabs'];
2126 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
2127 $lng->loadLanguageModule(
"administration");
2128 $lng->loadLanguageModule(
"mail");
2129 $lng->loadLanguageModule(
"chatroom");
2131 $ilTabs->activateTab(
'settings');
2132 $ilTabs->activateSubTab(
'standard_fields');
2134 include_once(
"./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
2136 if ($this->confirm_change) {
2137 $tab->setConfirmChange();
2149 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
2150 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2154 $ilias =
$DIC[
'ilias'];
2160 include_once(
"./Services/User/classes/class.ilUserProfile.php");
2162 $up->skipField(
"username");
2163 $field_properties = $up->getStandardFields();
2164 $profile_fields = array_keys($field_properties);
2167 foreach ($profile_fields as $field) {
2168 if (
$_POST[
"chb"][
"required_" . $field] &&
2169 !(
int)
$_POST[
'chb'][
'visib_reg_' . $field]
2181 $this->confirm_change = 1;
2187 $fixed_required_fields = array(
2194 "hits_per_page" => 0,
2196 "hide_own_online_status" => 0
2201 if ($privacy->enabledCourseExport() ==
true &&
2202 $privacy->courseConfirmationRequired() ==
true &&
2203 $action !=
"save") {
2204 foreach ($profile_fields as $field) {
2205 if (!$ilias->getSetting(
"usr_settings_course_export_" . $field) &&
$_POST[
"chb"][
"course_export_" . $field] ==
"1") {
2206 #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export'));
2207 #$this->confirm_change = 1;
2208 #$this->settingsObject();
2214 if ($action ==
'save') {
2215 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2219 foreach ($profile_fields as $field) {
2225 if (!
$_POST[
"chb"][
"visible_" . $field] && !$field_properties[$field][
"visible_hide"]) {
2231 if (!
$_POST[
"chb"][
"changeable_" . $field] && !$field_properties[$field][
"changeable_hide"]) {
2238 if ((
int)
$_POST[
'chb'][
'visib_reg_' . $field] && !$field_properties[$field][
"visib_reg_hide"]) {
2239 $ilSetting->set(
'usr_settings_visib_reg_' . $field,
'1');
2241 $ilSetting->set(
'usr_settings_visib_reg_' . $field,
'0');
2244 if ((
int)
$_POST[
'chb'][
'visib_lua_' . $field]) {
2245 $ilSetting->set(
'usr_settings_visib_lua_' . $field,
'1');
2247 $ilSetting->set(
'usr_settings_visib_lua_' . $field,
'0');
2250 if ((
int)
$_POST[
'chb'][
'changeable_lua_' . $field]) {
2251 $ilSetting->set(
'usr_settings_changeable_lua_' . $field,
'1');
2253 $ilSetting->set(
'usr_settings_changeable_lua_' . $field,
'0');
2256 if (
$_POST[
"chb"][
"export_" . $field] && !$field_properties[$field][
"export_hide"]) {
2257 $ilias->setSetting(
"usr_settings_export_" . $field,
"1");
2259 $ilias->deleteSetting(
"usr_settings_export_" . $field);
2263 if (
$_POST[
"chb"][
"course_export_" . $field] && !$field_properties[$field][
"course_export_hide"]) {
2264 $ilias->setSetting(
"usr_settings_course_export_" . $field,
"1");
2266 $ilias->deleteSetting(
"usr_settings_course_export_" . $field);
2270 if (
$_POST[
"chb"][
"group_export_" . $field] && !$field_properties[$field][
"group_export_hide"]) {
2271 $ilias->setSetting(
"usr_settings_group_export_" . $field,
"1");
2273 $ilias->deleteSetting(
"usr_settings_group_export_" . $field);
2276 $is_fixed = array_key_exists($field, $fixed_required_fields);
2277 if ($is_fixed && $fixed_required_fields[$field] || !$is_fixed &&
$_POST[
"chb"][
"required_" . $field]) {
2278 $ilias->setSetting(
"require_" . $field,
"1");
2280 $ilias->deleteSetting(
"require_" . $field);
2284 if (
$_POST[
"select"][
"default_hits_per_page"]) {
2285 $ilias->setSetting(
"hits_per_page",
$_POST[
"select"][
"default_hits_per_page"]);
2293 if (
$_POST[
"chb"][
"export_preferences"]) {
2294 $ilias->setSetting(
"usr_settings_export_preferences",
$_POST[
"chb"][
"export_preferences"]);
2296 $ilias->deleteSetting(
"usr_settings_export_preferences");
2299 $ilias->setSetting(
'mail_incoming_mail', (
int)
$_POST[
'select'][
'default_mail_incoming_mail']);
2304 ilUtil::sendSuccess($this->lng->txt(
"usr_settings_saved"));
2314 $action[-1] = $this->lng->txt(
'all_users');
2315 $action[1] = $this->lng->txt(
'usr_active_only');
2316 $action[0] = $this->lng->txt(
'usr_inactive_only');
2317 $action[2] = $this->lng->txt(
'usr_limited_access_only');
2318 $action[3] = $this->lng->txt(
'usr_without_courses');
2319 $action[4] = $this->lng->txt(
'usr_filter_lastlogin');
2320 $action[5] = $this->lng->txt(
"usr_filter_coursemember");
2321 $action[6] = $this->lng->txt(
"usr_filter_groupmember");
2322 $action[7] = $this->lng->txt(
"usr_filter_role");
2335 if (!isset(
$_POST[
"file"])) {
2336 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
2339 if (count(
$_POST[
"file"]) > 1) {
2340 $this->
ilias->raiseError($this->lng->txt(
"select_max_one_item"), $this->ilias->error_obj->MESSAGE);
2343 $file = basename(
$_POST[
"file"][0]);
2345 $export_dir = $this->
object->getExportDirectory();
2354 if (!isset(
$_POST[
"file"])) {
2355 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
2359 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2361 $cgui->setFormAction($this->ctrl->getFormAction($this));
2362 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
2363 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteExportFile");
2364 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteExportFile");
2367 foreach (
$_POST[
"file"] as $file) {
2368 $cgui->addItem(
"file[]", $file, $file, ilObject::_getIcon($this->object->getId()), $this->lng->txt(
"obj_usrf"));
2371 $this->tpl->setContent($cgui->getHTML());
2380 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2389 $export_dir = $this->
object->getExportDirectory();
2390 foreach (
$_POST[
"file"] as $file) {
2391 $file = basename($file);
2393 $exp_file = $export_dir .
"/" . $file;
2394 if (@is_file($exp_file)) {
2398 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2408 $this->
object->buildExportFile(
$_POST[
"export_type"]);
2409 $this->ctrl->redirect($this,
'export');
2422 $button->setCaption(
'create_export_file');
2423 $button->setCommand(
'performExport');
2425 $toolbar->setFormAction($this->ctrl->getFormAction($this));
2427 $export_types = array(
2428 "userfolder_export_excel_x86",
2429 "userfolder_export_csv",
2430 "userfolder_export_xml"
2433 foreach ($export_types as
$type) {
2436 $type_selection = new \ilSelectInputGUI(
'',
'export_type');
2437 $type_selection->setOptions($options);
2439 $toolbar->addInputItem($type_selection,
true);
2440 $toolbar->addButtonInstance($button);
2442 $table = new \ilUserExportFileTableGUI($this,
'export');
2444 $table->parse($this->object->getExportFiles());
2446 $this->tpl->setContent($table->getHTML());
2457 $lng->loadLanguageModule(
"meta");
2458 $lng->loadLanguageModule(
"mail");
2460 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2462 $form->setFormAction(
$ilCtrl->getFormAction($this));
2465 $form->setTitle(
$lng->txt(
"user_new_account_mail"));
2466 $form->setDescription(
$lng->txt(
"user_new_account_mail_desc"));
2468 $langs =
$lng->getInstalledLanguages();
2469 foreach ($langs as $lang_key) {
2470 $amail = $this->
object->_lookupNewAccountMail($lang_key);
2472 $title =
$lng->txt(
"meta_l_" . $lang_key);
2473 if ($lang_key ==
$lng->getDefaultLanguage()) {
2474 $title .=
" (" .
$lng->txt(
"default") .
")";
2478 $header->setTitle($title);
2479 $form->addItem($header);
2483 $subj->setValue($amail[
"subject"]);
2484 $form->addItem($subj);
2486 $salg =
new ilTextInputGUI(
$lng->txt(
"mail_salutation_general"),
"sal_g_" . $lang_key);
2488 $salg->setValue($amail[
"sal_g"]);
2489 $form->addItem($salg);
2491 $salf =
new ilTextInputGUI(
$lng->txt(
"mail_salutation_female"),
"sal_f_" . $lang_key);
2493 $salf->setValue($amail[
"sal_f"]);
2494 $form->addItem($salf);
2498 $salm->setValue($amail[
"sal_m"]);
2499 $form->addItem($salm);
2503 $body->setValue($amail[
"body"]);
2505 $body->setCols(100);
2506 $form->addItem($body);
2509 $att->setAllowDeletion(
true);
2510 if ($amail[
"att_file"]) {
2511 $att->setValue($amail[
"att_file"]);
2513 $form->addItem($att);
2516 $form->addCommandButton(
"saveNewAccountMail",
$lng->txt(
"save"));
2517 $form->addCommandButton(
"cancelNewAccountMail",
$lng->txt(
"cancel"));
2532 $this->tabs_gui->setTabActive(
'settings');
2533 $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
2537 $ftpl =
new ilTemplate(
'tpl.usrf_new_account_mail.html',
true,
true,
'Services/User');
2538 $ftpl->setVariable(
"FORM", $form->getHTML());
2542 $ftpl->setVariable(
"TXT_USE_PLACEHOLDERS",
$lng->txt(
"mail_nacc_use_placeholder"));
2543 $ftpl->setVariable(
"TXT_MAIL_SALUTATION",
$lng->txt(
"mail_nacc_salutation"));
2544 $ftpl->setVariable(
"TXT_FIRST_NAME",
$lng->txt(
"firstname"));
2545 $ftpl->setVariable(
"TXT_LAST_NAME",
$lng->txt(
"lastname"));
2546 $ftpl->setVariable(
"TXT_EMAIL",
$lng->txt(
"email"));
2547 $ftpl->setVariable(
"TXT_LOGIN",
$lng->txt(
"mail_nacc_login"));
2548 $ftpl->setVariable(
"TXT_PASSWORD",
$lng->txt(
"password"));
2549 $ftpl->setVariable(
"TXT_PASSWORD_BLOCK",
$lng->txt(
"mail_nacc_pw_block"));
2550 $ftpl->setVariable(
"TXT_NOPASSWORD_BLOCK",
$lng->txt(
"mail_nacc_no_pw_block"));
2551 $ftpl->setVariable(
"TXT_ADMIN_MAIL",
$lng->txt(
"mail_nacc_admin_mail"));
2552 $ftpl->setVariable(
"TXT_ILIAS_URL",
$lng->txt(
"mail_nacc_ilias_url"));
2553 $ftpl->setVariable(
"TXT_CLIENT_NAME",
$lng->txt(
"mail_nacc_client_name"));
2554 $ftpl->setVariable(
"TXT_TARGET",
$lng->txt(
"mail_nacc_target"));
2555 $ftpl->setVariable(
"TXT_TARGET_TITLE",
$lng->txt(
"mail_nacc_target_title"));
2556 $ftpl->setVariable(
"TXT_TARGET_TYPE",
$lng->txt(
"mail_nacc_target_type"));
2557 $ftpl->setVariable(
"TXT_TARGET_BLOCK",
$lng->txt(
"mail_nacc_target_block"));
2558 $ftpl->setVariable(
"TXT_IF_TIMELIMIT",
$lng->txt(
"mail_nacc_if_timelimit"));
2559 $ftpl->setVariable(
"TXT_TIMELIMIT",
$lng->txt(
"mail_nacc_timelimit"));
2561 $this->tpl->setContent($ftpl->get());
2566 $this->ctrl->redirect($this,
"settings");
2575 $langs =
$lng->getInstalledLanguages();
2576 foreach ($langs as $lang_key) {
2577 $this->
object->_writeNewAccountMail(
2586 if ($_FILES[
"att_" . $lang_key][
"tmp_name"]) {
2587 $this->
object->_updateAccountMailAttachment(
2589 $_FILES[
"att_" . $lang_key][
"tmp_name"],
2590 $_FILES[
"att_" . $lang_key][
"name"]
2594 if (
$_POST[
"att_" . $lang_key .
"_delete"]) {
2595 $this->
object->_deleteAccountMailAttachment($lang_key);
2599 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2600 $this->ctrl->redirect($this,
"newAccountMail");
2615 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
2622 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
2623 $this->tabs_gui->addTarget(
2625 $this->ctrl->getLinkTarget($this,
"view"),
2626 array(
"view",
"delete",
"resetFilter",
"userAction",
""),
2633 $this->tabs_gui->addTarget(
2634 "search_user_extended",
2635 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''),
2637 "ilrepositorysearchgui",
2643 if (
$rbacsystem->checkAccess(
"write,read_users", $this->object->getRefId())) {
2644 $this->tabs_gui->addTarget(
2646 $this->ctrl->getLinkTarget($this,
"generalSettings"),
2647 array(
'askForUserPasswordReset',
'forceUserPasswordReset',
'settings',
'generalSettings',
'listUserDefinedField',
'newAccountMail')
2650 $this->tabs_gui->addTarget(
2652 $this->ctrl->getLinkTarget($this,
"export"),
2659 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
2660 $this->tabs_gui->addTarget(
2662 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2663 array(
"perm",
"info",
"owner"),
2682 $this->tabs_gui->addSubTabTarget(
2684 $this->ctrl->getLinkTarget($this,
'generalSettings'),
2688 $this->tabs_gui->addSubTabTarget(
2690 $this->ctrl->getLinkTarget($this,
'settings'),
2691 array(
"settings",
"saveGlobalUserSettings"),
2694 $this->tabs_gui->addSubTabTarget(
2695 "user_defined_fields",
2696 $this->ctrl->getLinkTargetByClass(
"ilcustomuserfieldsgui",
"listUserDefinedFields"),
2697 "listUserDefinedFields",
2700 $this->tabs_gui->addSubTabTarget(
2701 "user_new_account_mail",
2702 $this->ctrl->getLinkTarget($this,
'newAccountMail'),
2707 $this->tabs_gui->addSubTabTarget(
2709 $this->ctrl->getLinkTargetByClass(
"iluserstartingpointgui",
"startingPoints"),
2715 $this->tabs_gui->addSubTabTarget(
2716 "user_profile_info",
2717 $this->ctrl->getLinkTargetByClass(
"ilUserProfileInfoSettingsGUI",
''),
2719 "ilUserProfileInfoSettingsGUI"
2722 #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"),
2723 # $this->ctrl->getLinkTargetByClass("ilaccountcodesgui"));
2734 $show_blocking_time_in_days = (int)
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
2737 $this->loginSettingsForm->setValuesByArray(array(
2738 'allow_change_loginname' => (
bool)
$ilSetting->get(
'allow_change_loginname'),
2739 'create_history_loginname' => (
bool)
$ilSetting->get(
'create_history_loginname'),
2740 'reuse_of_loginnames' => (
bool)
$ilSetting->get(
'reuse_of_loginnames'),
2741 'loginname_change_blocking_time' => (
float) $show_blocking_time_in_days
2744 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2750 $this->tabs_gui->setTabActive(
'settings');
2751 $this->tabs_gui->setSubTabActive(
'loginname_settings');
2753 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2755 $this->loginSettingsForm->
setFormAction($this->ctrl->getFormAction($this,
'saveLoginnameSettings'));
2756 $this->loginSettingsForm->setTitle($this->lng->txt(
'loginname_settings'));
2758 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
2759 $chbChangeLogin->setValue(1);
2760 $this->loginSettingsForm->addItem($chbChangeLogin);
2761 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
2762 $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
2763 $chbCreateHistory->setValue(1);
2764 $chbChangeLogin->addSubItem($chbCreateHistory);
2765 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
2766 $chbReuseLoginnames->setValue(1);
2767 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2768 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2769 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
2770 $chbChangeBlockingTime->allowDecimals(
true);
2771 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
2772 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
2773 $chbChangeBlockingTime->setSize(10);
2774 $chbChangeBlockingTime->setMaxLength(10);
2775 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2777 $this->loginSettingsForm->addCommandButton(
'saveLoginnameSettings', $this->lng->txt(
'save'));
2788 if ($this->loginSettingsForm->checkInput()) {
2791 if (!strlen($this->loginSettingsForm->getInput(
'loginname_change_blocking_time'))) {
2793 $this->loginSettingsForm->getItemByPostVar(
'loginname_change_blocking_time')
2794 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
2798 $save_blocking_time_in_seconds = (int) $this->loginSettingsForm->getInput(
'loginname_change_blocking_time') * 86400;
2800 $ilSetting->set(
'allow_change_loginname', (
int) $this->loginSettingsForm->getInput(
'allow_change_loginname'));
2801 $ilSetting->set(
'create_history_loginname', (
int) $this->loginSettingsForm->getInput(
'create_history_loginname'));
2802 $ilSetting->set(
'reuse_of_loginnames', (
int) $this->loginSettingsForm->getInput(
'reuse_of_loginnames'));
2803 $ilSetting->set(
'loginname_change_blocking_time', (
int) $save_blocking_time_in_seconds);
2805 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
2812 $this->loginSettingsForm->setValuesByPost();
2814 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2824 $ilAccess =
$DIC[
'ilAccess'];
2830 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2831 ilUtil::redirect(
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" . $a_target .
"&jmpToUser=" . $a_user);
2834 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
2836 $lng->txt(
"msg_no_perm_read_item"),
2855 $ilCtrl->setParameterByClass(
"ilobjusergui",
"obj_id", (
int)
$_GET[
"jmpToUser"]);
2856 $ilCtrl->redirectByClass(
"ilobjusergui",
"view");
2870 $a_user_ids =
$access->filterUserIdsByPositionOfCurrentUser(
2885 if (!count((array) $a_usr_ids)) {
2890 $_POST[
'id'] = $a_usr_ids;
2893 if (stristr($a_cmd,
"export")) {
2894 $cmd = $a_cmd .
"Object";
2895 return $this->$cmd();
2898 $_POST[
'selectedAction'] = $a_cmd;
2911 if ($a_search_form) {
2914 'activate' => $this->lng->txt(
'activate'),
2915 'deactivate' => $this->lng->txt(
'deactivate'),
2916 'accessRestrict' => $this->lng->txt(
'accessRestrict'),
2917 'accessFree' => $this->lng->txt(
'accessFree')
2922 $cmds[
"delete"] = $this->lng->txt(
"delete");
2929 'activateUsers' => $this->lng->txt(
'activate'),
2930 'deactivateUsers' => $this->lng->txt(
'deactivate'),
2931 'restrictAccess' => $this->lng->txt(
'accessRestrict'),
2932 'freeAccess' => $this->lng->txt(
'accessFree')
2937 $cmds[
"deleteUsers"] = $this->lng->txt(
"delete");
2942 $export_types = array(
"userfolder_export_excel_x86",
"userfolder_export_csv",
"userfolder_export_xml");
2943 foreach ($export_types as
$type) {
2944 $cmd = explode(
"_",
$type);
2945 $cmd = array_pop($cmd);
2946 $cmds[
'usrExport' . ucfirst($cmd)] = $this->lng->txt(
'export') .
' - ' .
2947 $this->lng->txt(
$type);
2952 include_once
"Services/Mail/classes/class.ilMail.php";
2954 if (
$rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2955 $cmds[
"mail"] = $this->lng->txt(
"send_mail");
2958 $cmds[
'addToClipboard'] = $this->lng->txt(
'clipboard_add_btn');
2971 return $this->ctrl->redirect($this,
'view');
2976 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2991 return $this->ctrl->redirect($this,
'view');
2996 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
3011 return $this->ctrl->redirect($this,
'view');
3015 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
3034 return $this->ctrl->redirect($this,
'view');
3038 include_once
"Services/Contact/classes/class.ilMailingLists.php";
3040 $list->deleteTemporaryLists();
3043 include_once
"Services/Contact/classes/class.ilMailingList.php";
3046 $list->setTitle(
"-TEMPORARY SYSTEM LIST-");
3047 $list->setDescription(
"-USER ACCOUNTS MAIL-");
3048 $list->setCreateDate(date(
"Y-m-d H:i:s"));
3050 $list_id = $list->getId();
3053 foreach ($user_ids as $user_id) {
3054 $list->assignUser($user_id);
3057 include_once
"Services/Mail/classes/class.ilFormatMail.php";
3059 $mail_data = $umail->getSavedData();
3061 if (!is_array($mail_data)) {
3062 $mail_data = array(
"user_id" =>
$ilUser->getId());
3068 $umail->savePostData(
3069 $mail_data[
'user_id'],
3070 $mail_data[
'attachments'],
3071 '#il_ml_' . $list_id,
3072 $mail_data[
'rcp_cc'],
3073 $mail_data[
'rcp_bcc'],
3074 $mail_data[
'm_type'],
3075 $mail_data[
'm_email'],
3076 $mail_data[
'm_subject'],
3077 $mail_data[
'm_message'],
3078 $mail_data[
'use_placeholders'],
3079 $mail_data[
'tpl_ctx_id'],
3080 $mail_data[
'tpl_ctx_params']
3083 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
3090 'type' =>
'search_res'
3098 switch ($a_form_id) {
3101 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
3111 'ps_password_min_length' => (
int) $security->getPasswordMinLength(),
3112 'ps_password_max_length' => (
int) $security->getPasswordMaxLength(),
3113 'ps_password_uppercase_chars_num' => (
int) $security->getPasswordNumberOfUppercaseChars(),
3114 'ps_password_lowercase_chars_num' => (
int) $security->getPasswordNumberOfLowercaseChars(),
3115 'ps_password_max_age' => (
int) $security->getPasswordMaxAge()
3117 $fields[
'ps_password_settings'] = array(
null,
null, $subitems);
3120 'ps_login_max_attempts' => (
int) $security->getLoginMaxAttempts(),
3123 $fields[
'ps_security_protection'] = array(
null,
null, $subitems);
3125 return array(array(
"generalSettings", $fields));
3135 if (!count($users)) {
3137 $this->ctrl->redirect($this,
'view');
3139 include_once
'./Services/User/classes/class.ilUserClipboard.php';
3144 ilUtil::sendSuccess($this->lng->txt(
'clipboard_user_added'),
true);
3145 $this->ctrl->redirect($this,
'view');
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
const USER_FOLDER_ID
Class ilObjUserFolder.
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
GUI class for account codes.
Confirmation screen class.
Class ilCustomUserFieldsGUI.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _getUserFolderId()
static _getAllUserIds($a_filter=0)
static getLogger($a_component_id)
Get component logger.
Class ilMailRfc822AddressParserFactory.
static _reset()
Reset all.
This class represents a non editable value in a property form.
static _getAssignUsersStatus($a_role_id)
Class ilObjUserFolderGUI.
addUserObject()
Add new user;.
addToClipboardObject()
Add users to clipboard.
deactivateUsersObject()
Deactivate users.
importCancelledObject()
import cancelled
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
saveGeneralSettingsObject()
Save user account settings.
addUserAutoCompleteObject()
Show auto complete results.
confirmdeactivateObject()
Set the selected users inactive.
verifyXmlData($importParser)
cancelNewAccountMailObject()
cancelSearchActionObject()
deleteUsersObject()
Delete users.
restrictAccessObject()
Restrict access.
usrExportCsvObject()
Export csv.
newAccountMailObject()
new account mail administration
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
initUserImportForm()
Init user import form.
activateUsersObject()
Activate users.
getPasswordPolicySettingsMap(\ilSecuritySettings $security)
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor @access public.
filterUserIdsByRbacOrPositionOfCurrentUser(array $user_ids)
confirmdeleteObject()
confirm delete Object
initFormGeneralSettings()
init general settings form
getUserMultiCommands($a_search_form=false)
getAdminTabs()
administration tabs show only permissions and trash folder
usrExportXmlObject()
Export xml.
initUserRoleAssignmentForm($xml_file_full_path)
checkAccess($a_permission)
viewObject($reset_filter=false)
list users
setAccessRestrictionObject($a_form=null, $a_from_search=false)
importUserFormObject()
display form for user import
forceUserPasswordResetObject()
askForUserPasswordResetObject()
confirmaccessFreeObject()
"access free"
importUserRoleAssignmentObject()
display form for user import with new FileSystem implementation
jumpToUserObject()
Jump to edit screen for user.
__buildUserFilterSelect()
build select form to distinguish between active and non-active users
importUsersObject()
Import Users with new form implementation.
showLoginnameSettingsObject()
initAccessRestrictionForm($a_from_search=false)
applyFilterObject()
Apply filter.
getActionUserIds()
Get selected items for table action.
cancelDeleteExportFileObject()
cancel deletion of export files
searchResultHandler($a_usr_ids, $a_cmd)
Handles multi command from repository search gui.
downloadExportFileObject()
Download selected export files.
confirmDeleteExportFileObject()
confirmation screen for export file deletion
checkAccessBool($a_permission)
saveNewAccountMailObject()
settingsObject()
Global user settings.
usrExportX86Object()
Export excel.
saveGlobalUserSettingsObject($action="")
cancelUserFolderActionObject()
static _goto($a_user)
goto target group
getImportDir()
get user import directory name with new FileSystem implementation
getTabs()
get tabs @access public
saveLoginnameSettingsObject()
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
searchUserAccessFilterCallable(array $a_user_ids)
showActions($with_subobjects=false)
show possible action (form buttons)
setSubTabs($a_tab)
set sub tabs
handleUploadedFiles()
Handles uploaded zip/xmp files with Filesystem implementation.
executeCommand()
execute command
deleteExportFileObject()
delete export files
generalSettingsObject()
Show user account general settings.
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
confirmaccessRestrictObject()
confirmactivateObject()
Set the selected users active.
chooseLetterObject()
Choose first letter.
freeAccessObject()
Free access.
addToExternalSettingsForm($a_form_id)
const ORG_OP_EDIT_USER_ACCOUNTS
static _lookupNewAccountMail($a_lang)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getFirstLettersOfLastnames(?array $user_ids=null)
Get first letters of all lastnames.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
prepareOutput($a_show_subobjects=true)
prepare output
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
This class represents an option in a radio group.
Singleton class that stores all security settings.
isPasswordSpecialCharsEnabled()
get boolean if the passwords have to contain special characters
getPasswordMustNotContainLoginnameStatus()
Return whether the password must not contain the loginname or not.
getPasswordMinLength()
get the minimum length for passwords
getPasswordMaxLength()
get the maximum length for passwords
getPasswordNumberOfUppercaseChars()
Returns number of uppercase characters required.
isPasswordCharsAndNumbersEnabled()
get boolean if the passwords have to contain characters and numbers
static _getInstance()
Get instance of ilSecuritySettings.
getPasswordNumberOfLowercaseChars()
Returns number of lowercase characters required.
const DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST
const DEFAULT_ALLOW_CLIENT_MAINTENANCE
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet
static updateLimitLog($a_new_value)
Log max session setting.
const SESSION_HANDLING_LOAD_DEPENDENT
const SESSION_HANDLING_FIXED
static getSessionExpireValue()
Returns the session expiration value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getInstance()
Singelton get instance.
Auto completion class for user lists.
static getInstance($a_usr_id)
Get singelton instance.
Learning progress account list for user administration.
static getInstance()
Single method to reduce footprint (included files, created instances)
User profile info settings UI class.
static _isSearchable($a_key)
static _saveStatus($a_key, $a_enabled)
User settings configuration (what preferences can be visible/changed/...)
Class ilUserStartingPointGUI.
TableGUI class for user administration.
static getDataDir()
get data directory (outside webspace)
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
redirection script todo: (a better solution should control the processing via a xml file)