4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
30 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
37 define(
'USER_FOLDER_ID', 7);
40 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
42 $this->lng->loadLanguageModule(
'search');
43 $this->lng->loadLanguageModule(
"user");
45 $ilCtrl->saveParameter($this,
"letter");
52 $this->user_owner_id = $a_id;
56 return $this->user_owner_id ? $this->user_owner_id :
USER_FOLDER_ID;
63 $ilTabs = $DIC[
'ilTabs'];
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
69 switch ($next_class) {
70 case 'ilusertablegui':
71 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
73 $u_table->initFilter();
74 $this->ctrl->setReturn($this,
'view');
75 $this->ctrl->forwardCommand($u_table);
78 case 'ilpermissiongui':
79 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
81 $ret = &$this->ctrl->forwardCommand($perm_gui);
84 case 'ilrepositorysearchgui':
85 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
87 $user_search->setTitle($this->lng->txt(
"search_user_extended"));
88 $user_search->enableSearchableCheck(
false);
89 $user_search->setUserLimitations(
false);
90 $user_search->setCallback(
92 'searchResultHandler',
95 $this->tabs_gui->setTabActive(
'search_user_extended');
96 $this->ctrl->setReturn($this,
'view');
97 $ret = &$this->ctrl->forwardCommand($user_search);
100 case 'ilaccountcodesgui':
101 $this->tabs_gui->setTabActive(
'settings');
103 $ilTabs->activateSubTab(
"account_codes");
104 include_once(
"./Services/User/classes/class.ilAccountCodesGUI.php");
106 $this->ctrl->forwardCommand($acc);
109 case 'ilcustomuserfieldsgui':
110 $this->tabs_gui->setTabActive(
'settings');
112 $ilTabs->activateSubTab(
"user_defined_fields");
113 include_once(
"./Services/User/classes/class.ilCustomUserFieldsGUI.php");
115 $this->ctrl->forwardCommand($cf);
118 case 'iluserstartingpointgui':
119 $this->tabs_gui->setTabActive(
'settings');
121 $ilTabs->activateSubTab(
"starting_points");
122 include_once(
"./Services/User/classes/class.ilUserStartingPointGUI.php");
124 $this->ctrl->forwardCommand($cf);
127 case 'iluserprofileinfosettingsgui':
128 $this->tabs_gui->setTabActive(
'settings');
130 $ilTabs->activateSubTab(
"user_profile_info");
132 $this->ctrl->forwardCommand($ps);
151 $rbacsystem = $DIC[
'rbacsystem'];
157 if (!$rbacsystem->checkAccess(
"read", $this->object->getRefId()) ||
160 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->
ilias->error_obj->MESSAGE);
163 include_once
"Services/User/classes/class.ilUserLPTableGUI.php";
175 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
177 $utab->resetOffset();
178 $utab->resetFilter();
193 $ilCtrl->setParameterByClass(
"ilobjusergui",
"new_type",
"usr");
194 $ilCtrl->redirectByClass(array(
"iladministrationgui",
"ilobjusergui"),
"create");
205 $ilTabs = $DIC[
'ilTabs'];
207 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
209 $utab->resetOffset();
210 $utab->writeFilterToSession();
212 $ilTabs->activateTab(
"usrf");
224 $rbacsystem = $DIC[
'rbacsystem'];
226 $ilToolbar = $DIC[
'ilToolbar'];
231 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
233 if ($rbacsystem->checkAccess(
'create_usr', $this->object->getRefId()) ||
234 $rbacsystem->checkAccess(
'cat_administrate_users', $this->object->getRefId())) {
236 $button->setCaption(
"usr_add");
237 $button->setUrl($this->ctrl->getLinkTarget($this,
"addUser"));
238 $ilToolbar->addButtonInstance($button);
241 $button->setCaption(
"import_users");
242 $button->setUrl($this->ctrl->getLinkTarget($this,
"importUserForm"));
243 $ilToolbar->addButtonInstance($button);
247 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
249 if ((
int)
$ilSetting->get(
'user_adm_alpha_nav')) {
250 $ilToolbar->addSeparator();
253 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
255 include_once(
"./Services/User/classes/class.ilObjUser.php");
261 $ai->setParentCommand($this,
"chooseLetter");
262 $ai->setHighlighted(
$_GET[
"letter"]);
263 $ilToolbar->addInputItem(
$ai,
true);
266 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
268 $tpl->setContent($utab->getHTML());
276 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
278 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email',
'second_email'));
279 $auto->enableFieldSearchableCheck(
false);
280 $auto->setMoreLinkAvailable(
true);
282 if (($_REQUEST[
'fetchall'])) {
286 echo $auto->getList($_REQUEST[
'term']);
302 $ilCtrl->redirect($this,
"view");
316 $rbacsystem = $DIC[
'rbacsystem'];
318 $operations = array();
320 if ($this->actions ==
"") {
322 "delete" => array(
"name" =>
"delete",
"lng" =>
"delete"),
323 "activate" => array(
"name" =>
"activate",
"lng" =>
"activate"),
324 "deactivate" => array(
"name" =>
"deactivate",
"lng" =>
"deactivate"),
325 "accessRestrict" => array(
"name" =>
"accessRestrict",
"lng" =>
"accessRestrict"),
326 "accessFree" => array(
"name" =>
"accessFree",
"lng" =>
"accessFree"),
327 "export" => array(
"name" =>
"export",
"lng" =>
"export")
333 if ($rbacsystem->checkAccess($row[
"name"], $this->object->getRefId())) {
334 $operations[] =
$row;
338 if (count($operations) > 0) {
339 $select =
"<select name=\"selectedAction\">\n";
340 foreach ($operations as $val) {
341 $select .=
"<option value=\"" . $val[
"name"] .
"\"";
342 if (strcmp(
$_POST[
"selectedAction"], $val[
"name"]) == 0) {
343 $select .=
" selected=\"selected\"";
346 $select .= $this->lng->txt($val[
"lng"]);
347 $select .=
"</option>";
349 $select .=
"</select>";
350 $this->tpl->setCurrentBlock(
"tbl_action_select");
351 $this->tpl->setVariable(
"SELECT_ACTION", $select);
352 $this->tpl->setVariable(
"BTN_NAME",
"userAction");
353 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"submit"));
354 $this->tpl->parseCurrentBlock();
357 if ($with_subobjects ===
true) {
361 if ((count($operations) > 0)
or $subobjs ===
true) {
362 $this->tpl->setCurrentBlock(
"tbl_action_row");
363 $this->tpl->setVariable(
"COLUMN_COUNTS", count($this->
data[
"cols"]));
365 $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
366 $this->tpl->parseCurrentBlock();
380 $rbacsystem = $DIC[
'rbacsystem'];
382 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
384 if (!$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId())) {
391 if ($row[
"max"] > 0) {
393 for (
$i = 0;
$i < count($this->
data[
"ctrl"]);
$i++) {
394 if ($this->
data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
399 if ($row[
"max"] ==
"" || $count < $row[
"max"]) {
400 $subobj[] = $row[
"name"];
405 if (is_array($subobj)) {
408 $this->tpl->setCurrentBlock(
"add_object");
409 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
410 $this->tpl->setVariable(
"BTN_NAME",
"create");
411 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
412 $this->tpl->parseCurrentBlock();
422 $this->ctrl->redirect($this,
'view');
427 $this->ctrl->redirectByClass(
'ilrepositorysearchgui',
'showSearchResults');
439 $rbacsystem = $DIC[
'rbacsystem'];
443 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
444 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->
ilias->error_obj->WARNING);
450 $obj = &$this->
ilias->obj_factory->getInstanceByObjId($id);
451 $obj->setActive(
true,
$ilUser->getId());
455 ilUtil::sendSuccess($this->lng->txt(
"user_activated"),
true);
458 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
460 $this->ctrl->redirect($this,
"view");
473 $rbacsystem = $DIC[
'rbacsystem'];
477 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
478 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->
ilias->error_obj->WARNING);
484 $obj = &$this->
ilias->obj_factory->getInstanceByObjId($id);
485 $obj->setActive(
false,
$ilUser->getId());
490 ilUtil::sendSuccess($this->lng->txt(
"user_deactivated"),
true);
493 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
495 $this->ctrl->redirect($this,
"view");
503 $rbacsystem = $DIC[
'rbacsystem'];
507 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
508 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->
ilias->error_obj->WARNING);
514 $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
515 $obj->setTimeLimitUnlimited(1);
516 $obj->setTimeLimitFrom(
"");
517 $obj->setTimeLimitUntil(
"");
518 $obj->setTimeLimitMessage(0);
523 ilUtil::sendSuccess($this->lng->txt(
"access_free_granted"),
true);
526 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
528 $this->ctrl->redirect($this,
"view");
537 $this->tpl->setContent($a_form->getHTML());
551 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
553 $form->setTitle($this->lng->txt(
"time_limit_add_time_limit_for_selected"));
554 $form->setFormAction($this->ctrl->getFormAction($this,
"confirmaccessRestrict"));
557 $from->setShowTime(
true);
558 $from->setRequired(
true);
563 $to->setShowTime(
true);
566 $form->addCommandButton(
"confirmaccessRestrict", $this->lng->txt(
"confirm"));
567 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
569 foreach ($user_ids as $user_id) {
571 $ufield->setValue($user_id);
572 $form->addItem($ufield);
576 if ($a_from_search ||
$_POST[
"frsrch"]) {
579 $form->addItem($field);
588 if (!
$form->checkInput()) {
594 if ($timeuntil <= $timefrom) {
601 $rbacsystem = $DIC[
'rbacsystem'];
605 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
606 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->
ilias->error_obj->WARNING);
612 $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
613 $obj->setTimeLimitUnlimited(0);
614 $obj->setTimeLimitFrom($timefrom);
615 $obj->setTimeLimitUntil($timeuntil);
616 $obj->setTimeLimitMessage(0);
621 ilUtil::sendSuccess($this->lng->txt(
"access_restricted"),
true);
624 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
626 $this->ctrl->redirect($this,
"view");
639 $rbacsystem = $DIC[
'rbacsystem'];
644 if (!$rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
646 $ilCtrl->redirect($this,
"view");
650 $this->
ilias->raiseError($this->lng->txt(
"msg_no_delete_yourself"), $this->
ilias->error_obj->WARNING);
656 $obj = &$this->
ilias->obj_factory->getInstanceByObjId($id);
661 ilUtil::sendSuccess($this->lng->txt(
"user_deleted"),
true);
664 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
666 $this->ctrl->redirect($this,
"view");
677 if (
$_POST[
"select_cmd_all"]) {
678 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
680 return $utab->getUserIdsForFilter();
693 $ilTabs = $DIC[
'ilTabs'];
697 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->
ilias->error_obj->MESSAGE);
700 if (!$a_from_search) {
701 $ilTabs->activateTab(
"obj_usrf");
703 $ilTabs->activateTab(
"search_user_extended");
706 if (strcmp(
$action,
"accessRestrict") == 0) {
709 if (strcmp(
$action,
"mail") == 0) {
715 if (!$a_from_search) {
716 $cancel =
"cancelUserFolderAction";
718 $cancel =
"cancelSearchAction";
722 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
724 $cgui->setFormAction($this->ctrl->getFormAction($this));
725 $cgui->setHeaderText($this->lng->txt(
"info_" .
$action .
"_sure"));
726 $cgui->setCancel($this->lng->txt(
"cancel"), $cancel);
727 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirm" .
$action);
729 if ($a_from_search) {
730 $cgui->addHiddenItem(
"frsrch", 1);
733 foreach ($user_ids as
$id) {
738 $login = $this->lng->txt(
"never");
743 $caption =
$user->getFullname() .
" (" .
$user->getLogin() .
")" .
", " .
744 $user->getEmail() .
" - " . $this->lng->txt(
"last_login") .
": " .
$login;
746 $cgui->addItem(
"id[]", $id, $caption);
749 $this->tpl->setContent($cgui->getHTML());
759 $_POST[
"selectedAction"] =
"delete";
768 $_POST[
"selectedAction"] =
"activate";
777 $_POST[
"selectedAction"] =
"deactivate";
786 $_POST[
"selectedAction"] =
"accessRestrict";
795 $_POST[
"selectedAction"] =
"accessFree";
812 $rbacsystem = $DIC[
'rbacsystem'];
815 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI') {
816 $this->tabs_gui->clearTargets();
819 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId())) {
820 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->
ilias->error_obj->MESSAGE);
824 $tpl->setContent($this->form->getHTML());
839 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
843 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
848 $this->form->addItem($fi);
850 $this->form->addCommandButton(
"importUserRoleAssignment",
$lng->txt(
"import"));
851 $this->form->addCommandButton(
"importCancelled",
$lng->txt(
"cancel"));
853 $this->form->setTitle(
$lng->txt(
"import_users"));
854 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
866 if (@is_dir($import_dir)) {
870 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui') {
871 $this->ctrl->redirect($this,
"view");
874 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
908 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI') {
909 $this->tabs_gui->clearTargets();
913 if ($this->form->checkInput()) {
914 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
915 include_once
'./Services/User/classes/class.ilUserImportParser.php';
920 $rbacsystem = $DIC[
'rbacsystem'];
921 $tree = $DIC[
'tree'];
925 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_import_roles.html",
"Services/User");
930 if (@is_dir($import_dir)) {
936 $file_name = $_FILES[
"importFile"][
"name"];
937 $parts = pathinfo($file_name);
938 $full_path = $import_dir .
"/" . $file_name;
941 if (!is_file($_FILES[
"importFile"][
"tmp_name"])) {
943 $this->
ilias->raiseError($this->lng->txt(
"no_import_file_found"), $this->
ilias->error_obj->MESSAGE);
945 ilUtil::moveUploadedFile(
946 $_FILES[
"importFile"][
"tmp_name"],
947 $_FILES[
"importFile"][
"name"],
952 if (strtolower($parts[
"extension"]) ==
"zip") {
958 foreach ($file_list as $a_file) {
959 if (substr($a_file[
'entry'], -4) ==
'.xml') {
960 $xml_file = $import_dir .
"/" . $a_file[
'entry'];
964 if (is_null($xml_file)) {
965 $subdir = basename($parts[
"basename"],
"." . $parts[
"extension"]);
966 $xml_file = $import_dir .
"/" . $subdir .
"/" . $subdir .
".xml";
971 $xml_file = $full_path;
975 if (!is_file($xml_file)) {
977 $this->
ilias->raiseError($this->lng->txt(
"no_xml_file_found_in_zip")
978 .
" " . $subdir .
"/" . $subdir .
".xml", $this->
ilias->error_obj->MESSAGE);
981 require_once(
"./Services/User/classes/class.ilUserImportParser.php");
986 $importParser->startParsing();
987 switch ($importParser->getErrorLevel()) {
991 $this->tpl->setVariable(
"IMPORT_LOG", $importParser->getProtocolAsHTML(
$lng->txt(
"verification_warning_log")));
995 $this->
ilias->raiseError(
996 $lng->txt(
"verification_failed") . $importParser->getProtocolAsHTML(
$lng->txt(
"verification_failure_log")),
997 $this->
ilias->error_obj->MESSAGE
1004 $this->tpl->setCurrentBlock(
"role_selection_form");
1005 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1006 $this->tpl->setVariable(
"TXT_IMPORT_USERS", $this->lng->txt(
"import_users"));
1007 $this->tpl->setVariable(
"TXT_IMPORT_FILE", $this->lng->txt(
"import_file"));
1008 $this->tpl->setVariable(
"IMPORT_FILE", $file_name);
1009 $this->tpl->setVariable(
"TXT_USER_ELEMENT_COUNT", $this->lng->txt(
"num_users"));
1010 $this->tpl->setVariable(
"USER_ELEMENT_COUNT", $importParser->getUserCount());
1011 $this->tpl->setVariable(
"TXT_ROLE_ASSIGNMENT", $this->lng->txt(
"role_assignment"));
1012 $this->tpl->setVariable(
"BTN_IMPORT", $this->lng->txt(
"import"));
1013 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1014 $this->tpl->setVariable(
"XML_FILE_NAME", $xml_file);
1018 $importParser->startParsing();
1019 $roles = $importParser->getCollectedRoles();
1022 $all_gl_roles =
$rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
1023 $gl_roles = array();
1025 foreach ($all_gl_roles as $obj_data) {
1033 if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID) {
1035 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID
or in_array(SYSTEM_ROLE_ID, $roles_of_user)) {
1036 $gl_roles[$obj_data[
"obj_id"]] = $obj_data[
"title"];
1042 $got_globals =
false;
1043 foreach ($roles as $role_id => $role) {
1044 if ($role[
"type"] ==
"Global") {
1045 if (!$got_globals) {
1046 $got_globals =
true;
1048 $this->tpl->setCurrentBlock(
"global_role_section");
1049 $this->tpl->setVariable(
"TXT_GLOBAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_global"));
1050 $this->tpl->setVariable(
"TXT_GLOBAL_ROLES", $this->lng->txt(
"assign_global_role"));
1054 $pre_select = array_search($role[
"name"], $gl_roles);
1056 switch ($role[
"name"]) {
1057 case "Administrator":
1058 $pre_select = array_search(
"Administrator", $gl_roles);
1062 $pre_select = array_search(
"User", $gl_roles);
1066 $pre_select = array_search(
"User", $gl_roles);
1070 $pre_select = array_search(
"Guest", $gl_roles);
1074 $pre_select = array_search(
"User", $gl_roles);
1078 $this->tpl->setCurrentBlock(
"global_role");
1079 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[" . $role_id .
"]", $gl_roles,
false,
true);
1080 $this->tpl->setVariable(
"TXT_IMPORT_GLOBAL_ROLE", $role[
"name"] .
" [" . $role_id .
"]");
1081 $this->tpl->setVariable(
"SELECT_GLOBAL_ROLE", $role_select);
1082 $this->tpl->parseCurrentBlock();
1087 $got_locals =
false;
1088 foreach ($roles as $role_id => $role) {
1089 if ($role[
"type"] ==
"Local") {
1096 $this->tpl->setCurrentBlock(
"local_role_section");
1097 $this->tpl->setVariable(
"TXT_LOCAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_local"));
1098 $this->tpl->setVariable(
"TXT_LOCAL_ROLES", $this->lng->txt(
"assign_local_role"));
1108 $loc_roles = array();
1111 foreach ($roles as $role_id => $role) {
1112 if ($role[
"type"] ==
"Local") {
1113 $searchName = (substr($role[
'name'], 0, 1) ==
'#') ? $role[
'name'] :
'#' . $role[
'name'];
1114 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1115 foreach ($matching_role_ids as $mid) {
1116 if (!in_array($mid, $loc_roles)) {
1117 $loc_roles[] = $mid;
1126 $loc_roles =
$rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1131 $l_roles_mailbox_searcharray = array();
1132 require_once
'Services/Mail/classes/Address/Type/class.ilMailRoleAddressType.php';
1133 foreach ($loc_roles as
$key => $loc_role) {
1135 $rolf =
$rbacreview->getFoldersAssignedToRole($loc_role,
true);
1143 $rbacsystem->checkAccess(
'write', $rolf[0]) &&
1144 $rolf[0] != ROLE_FOLDER_ID
1156 $path_array = array();
1157 if ($this->tree->isInTree($rolf[0])) {
1160 $tmpPath = $this->tree->getPathFull($rolf[0]);
1161 $tmpPath[] = $rolf[0];
1163 for (
$i = 1,
$n = count($tmpPath) - 1;
$i <
$n;
$i++) {
1164 if ($i < 3 || $i > $n - 3) {
1165 $path_array[] = $tmpPath[
$i][
'title'];
1166 } elseif (
$i == 3 ||
$i == $n - 3) {
1167 $path_array[] =
'...';
1170 $isInSubtree |= $tmpPath[
$i][
'obj_id'] == $this->
object->getId();
1173 $path = implode(
" < ", array_reverse($path_array));
1175 $path =
"<b>Rolefolder " . $rolf[0] .
" not found in tree! (Role " . $loc_role .
")</b>";
1177 $roleMailboxAddress = (new \ilRoleMailboxAddress($loc_role))->value();
1178 $l_roles[$loc_role] = $roleMailboxAddress .
', ' .
$path;
1183 natcasesort($l_roles);
1184 $l_roles[
""] = $this->lng->txt(
"usrimport_ignore_role");
1187 foreach ($roles as $role_id => $role) {
1188 if ($role[
"type"] ==
"Local") {
1189 $this->tpl->setCurrentBlock(
"local_role");
1190 $this->tpl->setVariable(
"TXT_IMPORT_LOCAL_ROLE", $role[
"name"]);
1191 $searchName = (substr($role[
'name'], 0, 1) ==
'#') ? $role[
'name'] :
'#' . $role[
'name'];
1192 $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1193 $pre_select = count($matching_role_ids) == 1 ? $matching_role_ids[0] :
"";
1198 $selectable_roles = array();
1199 $selectable_roles[
""] = $this->lng->txt(
"usrimport_ignore_role");
1200 foreach ($matching_role_ids as
$id) {
1201 $selectable_roles[
$id] = $l_roles[
$id];
1203 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[" . $role_id .
"]", $selectable_roles,
false,
true);
1205 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[" . $role_id .
"]", $l_roles,
false,
true);
1207 $this->tpl->setVariable(
"SELECT_LOCAL_ROLE", $role_select);
1208 $this->tpl->parseCurrentBlock();
1214 $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING",
$lng->txt(
"conflict_handling"));
1219 $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING_INFO", str_replace(
'\n',
'<br>', $this->lng->txt(
"usrimport_conflict_handling_info")));
1220 $this->tpl->setVariable(
"TXT_CONFLICT_CHOICE",
$lng->txt(
"conflict_handling"));
1224 $this->lng->loadLanguageModule(
"mail");
1225 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1227 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"") {
1228 $this->tpl->setCurrentBlock(
"inform_user");
1229 $this->tpl->setVariable(
"TXT_ACCOUNT_MAIL",
$lng->txt(
"mail_account_mail"));
1231 $this->tpl->setVariable(
"SEND_MAIL",
" checked=\"checked\"");
1233 $this->tpl->setVariable(
1234 "TXT_INFORM_USER_MAIL",
1235 $this->lng->txt(
"user_send_new_account_mail")
1237 $this->tpl->parseCurrentBlock();
1240 $this->form->setValuesByPost();
1241 $tpl->setContent($this->form->getHtml());
1256 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI') {
1257 $this->tabs_gui->clearTargets();
1260 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1261 include_once
'./Services/User/classes/class.ilUserImportParser.php';
1266 $rbacsystem = $DIC[
'rbacsystem'];
1267 $tree = $DIC[
'tree'];
1270 switch (
$_POST[
"conflict_handling_choice"]) {
1271 case "update_on_conflict":
1274 case "ignore_on_conflict":
1286 if (
$_POST[
"role_assign"]) {
1289 foreach (
$_POST[
"role_assign"] as $role_id) {
1290 if ($role_id !=
"") {
1291 if (in_array($role_id, $global_roles)) {
1292 if (!in_array(SYSTEM_ROLE_ID, $roles_of_user)) {
1293 if ($role_id == SYSTEM_ROLE_ID && !in_array(SYSTEM_ROLE_ID, $roles_of_user)
1298 $this->
ilias->raiseError(
1299 $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1300 $this->
ilias->error_obj->MESSAGE
1305 $rolf =
$rbacreview->getFoldersAssignedToRole($role_id,
true);
1307 || !$rbacsystem->checkAccess(
'write', $rolf[0])) {
1309 $this->
ilias->raiseError(
1310 $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1311 $this->
ilias->error_obj->MESSAGE
1320 $importParser->setRoleAssignment(
$_POST[
"role_assign"]);
1321 $importParser->startParsing();
1326 switch ($importParser->getErrorLevel()) {
1328 ilUtil::sendSuccess($this->lng->txt(
"user_imported"),
true);
1331 ilUtil::sendInfo($this->lng->txt(
"user_imported_with_warnings") . $importParser->getProtocolAsHTML(
$lng->txt(
"import_warning_log")),
true);
1334 $this->
ilias->raiseError(
1335 $this->lng->txt(
"user_import_failed")
1336 . $importParser->getProtocolAsHTML(
$lng->txt(
"import_failure_log")),
1337 $this->
ilias->error_obj->MESSAGE
1342 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
1343 $this->ctrl->redirect($this,
"view");
1346 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1352 parent::hitsperpageObject();
1368 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1371 $show_blocking_time_in_days =
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
1372 $show_blocking_time_in_days = (float) $show_blocking_time_in_days;
1374 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1377 $this->form->setValuesByArray(
1379 'lua' => $aset->isLocalUserAdministrationEnabled(),
1380 'lrua' => $aset->isUserAccessRestricted(),
1381 'allow_change_loginname' => (bool)
$ilSetting->get(
'allow_change_loginname'),
1382 'create_history_loginname' => (bool)
$ilSetting->get(
'create_history_loginname'),
1383 'reuse_of_loginnames' => (bool)
$ilSetting->get(
'reuse_of_loginnames'),
1384 'loginname_change_blocking_time' => (float) $show_blocking_time_in_days,
1385 'user_adm_alpha_nav' => (
int)
$ilSetting->get(
'user_adm_alpha_nav'),
1387 'user_reactivate_code' => (int)
$ilSetting->get(
'user_reactivate_code'),
1388 'user_own_account' => (int)
$ilSetting->get(
'user_delete_own_account'),
1389 'user_own_account_email' =>
$ilSetting->get(
'user_delete_own_account_email'),
1392 'session_reminder_enabled' =>
$ilSetting->get(
'session_reminder_enabled'),
1398 'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1399 'password_must_not_contain_loginame' => $security->getPasswordMustNotContainLoginnameStatus() ? 1 : 0,
1400 'password_chars_and_numbers_enabled' => $security->isPasswordCharsAndNumbersEnabled() ? 1 : 0,
1401 'password_special_chars_enabled' => $security->isPasswordSpecialCharsEnabled() ? 1 : 0 ,
1402 'password_min_length' => $security->getPasswordMinLength(),
1403 'password_max_length' => $security->getPasswordMaxLength(),
1404 'password_ucase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
1405 'password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
1406 'password_max_age' => $security->getPasswordMaxAge(),
1408 'login_max_attempts' => $security->getLoginMaxAttempts(),
1409 'ps_prevent_simultaneous_logins' => (int) $security->isPreventionOfSimultaneousLoginsEnabled(),
1410 'password_assistance' => (bool)
$ilSetting->get(
"password_assistance")
1411 ,
'letter_avatars' => (int)
$ilSetting->get(
'letter_avatars')
1415 $this->tpl->setContent($this->form->getHTML());
1431 if ($this->form->checkInput()) {
1434 if (!strlen($this->form->getInput(
'loginname_change_blocking_time'))) {
1436 $this->form->getItemByPostVar(
'loginname_change_blocking_time')
1437 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
1440 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1444 $security->setPasswordCharsAndNumbersEnabled((
bool)
$_POST[
"password_chars_and_numbers_enabled"]);
1445 $security->setPasswordSpecialCharsEnabled((
bool) $_POST[
"password_special_chars_enabled"]);
1446 $security->setPasswordMinLength((
int) $_POST[
"password_min_length"]);
1447 $security->setPasswordMaxLength((
int) $_POST[
"password_max_length"]);
1448 $security->setPasswordNumberOfUppercaseChars((
int) $_POST[
'password_ucase_chars_num']);
1449 $security->setPasswordNumberOfLowercaseChars((
int) $_POST[
'password_lowercase_chars_num']);
1450 $security->setPasswordMaxAge((
int) $_POST[
"password_max_age"]);
1451 $security->setLoginMaxAttempts((
int) $_POST[
"login_max_attempts"]);
1452 $security->setPreventionOfSimultaneousLogins((
bool) $_POST[
'ps_prevent_simultaneous_logins']);
1453 $security->setPasswordChangeOnFirstLoginEnabled((
bool) $_POST[
'password_change_on_first_login_enabled']);
1454 $security->setPasswordMustNotContainLoginnameStatus((
int) $_POST[
'password_must_not_contain_loginame']);
1456 if (!$security->validate($this->form)) {
1463 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1468 $ilSetting->set(
'allow_change_loginname', (
int) $this->form->getInput(
'allow_change_loginname'));
1469 $ilSetting->set(
'create_history_loginname', (
int) $this->form->getInput(
'create_history_loginname'));
1470 $ilSetting->set(
'reuse_of_loginnames', (
int) $this->form->getInput(
'reuse_of_loginnames'));
1471 $save_blocking_time_in_seconds = (int) ($this->form->getInput(
'loginname_change_blocking_time') * 86400);
1472 $ilSetting->set(
'loginname_change_blocking_time', (
int) $save_blocking_time_in_seconds);
1473 $ilSetting->set(
'user_adm_alpha_nav', (
int) $this->form->getInput(
'user_adm_alpha_nav'));
1474 $ilSetting->set(
'user_reactivate_code', (
int) $this->form->getInput(
'user_reactivate_code'));
1476 $ilSetting->set(
'user_delete_own_account', (
int) $this->form->getInput(
'user_own_account'));
1477 $ilSetting->set(
'user_delete_own_account_email', $this->form->getInput(
'user_own_account_email'));
1479 $ilSetting->set(
"password_assistance", $this->form->getInput(
"password_assistance"));
1483 'session_handling_type',
1484 (
int) $this->form->getInput(
'session_handling_type')
1489 'session_reminder_enabled',
1490 $this->form->getInput(
'session_reminder_enabled')
1493 require_once
'Services/Authentication/classes/class.ilSessionControl.php';
1496 'session_allow_client_maintenance',
1501 include_once
"Services/Authentication/classes/class.ilSessionStatistics.php";
1505 'session_max_count',
1506 (
int) $this->form->getInput(
'session_max_count')
1510 (
int) $this->form->getInput(
'session_min_idle')
1514 (
int) $this->form->getInput(
'session_max_idle')
1517 'session_max_idle_after_first_request',
1518 (
int) $this->form->getInput(
'session_max_idle_after_first_request')
1523 $ilSetting->set(
'letter_avatars', (
int) $this->form->getInput(
'letter_avatars'));
1524 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
1531 $this->form->setValuesByPost();
1532 $this->tpl->setContent($this->form->getHTML());
1547 $this->tabs_gui->setTabActive(
'settings');
1548 $this->tabs_gui->setSubTabActive(
'general_settings');
1550 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1552 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveGeneralSettings'));
1554 $this->form->setTitle($this->lng->txt(
'general_settings'));
1556 $lua =
new ilCheckboxInputGUI($this->lng->txt(
'enable_local_user_administration'),
'lua');
1557 $lua->
setInfo($this->lng->txt(
'enable_local_user_administration_info'));
1559 $this->form->addItem($lua);
1562 $lrua->
setInfo($this->lng->txt(
'restrict_user_access_info'));
1564 $this->form->addItem($lrua);
1567 $alph =
new ilCheckboxInputGUI($this->lng->txt(
'user_adm_enable_alpha_nav'),
'user_adm_alpha_nav');
1570 $this->form->addItem($alph);
1574 $code->setInfo($this->lng->txt(
'user_account_code_setting_info'));
1575 $this->form->addItem(
$code);
1578 $own =
new ilCheckboxInputGUI($this->lng->txt(
"user_allow_delete_own_account"),
"user_own_account");
1579 $this->form->addItem($own);
1580 $own_email =
new ilEMailInputGUI($this->lng->txt(
"user_delete_own_account_notification_email"),
"user_own_account_email");
1581 $own->addSubItem($own_email);
1593 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"session_reminder"),
"session_reminder_enabled");
1596 $cb->
setInfo($this->lng->txt(
"session_reminder_info") .
"<br />" .
1597 sprintf($this->lng->txt(
'session_reminder_session_duration'),
$time));
1601 $ssettings->addOption($fixed);
1607 require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
1611 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_count'),
'session_max_count');
1613 $sub_ti->setSize(5);
1614 $sub_ti->setInfo($this->lng->txt(
'session_max_count_info'));
1616 $sub_ti->setDisabled(
true);
1618 $ldsh->addSubItem($sub_ti);
1623 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_min_idle'),
'session_min_idle');
1625 $sub_ti->setSize(5);
1626 $sub_ti->setInfo($this->lng->txt(
'session_min_idle_info'));
1628 $sub_ti->setDisabled(
true);
1630 $ldsh->addSubItem($sub_ti);
1635 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_idle'),
'session_max_idle');
1637 $sub_ti->setSize(5);
1638 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_info'));
1640 $sub_ti->setDisabled(
true);
1642 $ldsh->addSubItem($sub_ti);
1647 $this->lng->txt(
'session_max_idle_after_first_request'),
1648 'session_max_idle_after_first_request' 1651 $sub_ti->setSize(5);
1652 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_after_first_request_info'));
1654 $sub_ti->setDisabled(
true);
1656 $ldsh->addSubItem($sub_ti);
1659 $ssettings->addOption($ldsh);
1665 $this->form->addItem($ssettings);
1670 $ti->
setValue($this->lng->txt(
'session_config_maintenance_disabled'));
1671 $ssettings->setDisabled(
true);
1672 $ti->addSubItem($ssettings);
1673 $this->form->addItem($ti);
1679 $this->lng->loadLanguageModule(
'ps');
1682 $pass->setTitle($this->lng->txt(
'ps_password_settings'));
1683 $this->form->addItem(
$pass);
1685 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_change_on_first_login_enabled'),
'password_change_on_first_login_enabled');
1686 $check->
setInfo($this->lng->txt(
'ps_password_change_on_first_login_enabled_info'));
1687 $this->form->addItem($check);
1689 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1691 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_must_not_contain_loginame'),
'password_must_not_contain_loginame');
1692 $check->
setInfo($this->lng->txt(
'ps_password_must_not_contain_loginame_info'));
1693 $this->form->addItem($check);
1695 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_chars_and_numbers_enabled'),
'password_chars_and_numbers_enabled');
1697 $check->
setInfo($this->lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
1698 $this->form->addItem($check);
1700 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_special_chars_enabled'),
'password_special_chars_enabled');
1702 $check->
setInfo($this->lng->txt(
'ps_password_special_chars_enabled_info'));
1703 $this->form->addItem($check);
1706 $text->setInfo($this->lng->txt(
'ps_password_min_length_info'));
1708 $text->setMaxLength(2);
1709 $this->form->addItem(
$text);
1712 $text->setInfo($this->lng->txt(
'ps_password_max_length_info'));
1714 $text->setMaxLength(3);
1715 $this->form->addItem(
$text);
1717 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_uppercase_chars_num'),
'password_ucase_chars_num');
1718 $text->setInfo($this->lng->txt(
'ps_password_uppercase_chars_num_info'));
1719 $text->setMinValue(0);
1721 $text->setMaxLength(3);
1722 $this->form->addItem(
$text);
1724 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_lowercase_chars_num'),
'password_lowercase_chars_num');
1725 $text->setInfo($this->lng->txt(
'ps_password_lowercase_chars_num_info'));
1726 $text->setMinValue(0);
1728 $text->setMaxLength(3);
1729 $this->form->addItem(
$text);
1732 $text->setInfo($this->lng->txt(
'ps_password_max_age_info'));
1734 $text->setMaxLength(3);
1735 $this->form->addItem(
$text);
1738 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"enable_password_assistance"),
"password_assistance");
1739 $cb->
setInfo($this->lng->txt(
"password_assistance_info"));
1740 $this->form->addItem($cb);
1743 $pass->setTitle($this->lng->txt(
'ps_security_protection'));
1744 $this->form->addItem(
$pass);
1747 $text->setInfo($this->lng->txt(
'ps_login_max_attempts_info'));
1749 $text->setMaxLength(2);
1750 $this->form->addItem(
$text);
1753 $objCb =
new ilCheckboxInputGUI($this->lng->txt(
'ps_prevent_simultaneous_logins'),
'ps_prevent_simultaneous_logins');
1755 $objCb->setInfo($this->lng->txt(
'ps_prevent_simultaneous_logins_info'));
1756 $this->form->addItem($objCb);
1762 $log->setTitle($this->lng->txt(
'loginname_settings'));
1763 $this->form->addItem(
$log);
1765 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
1767 $this->form->addItem($chbChangeLogin);
1768 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
1769 $chbCreateHistory->
setInfo($this->lng->txt(
'loginname_history_info'));
1770 $chbCreateHistory->setValue(1);
1772 $chbChangeLogin->addSubItem($chbCreateHistory);
1773 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
1775 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
1777 $chbChangeLogin->addSubItem($chbReuseLoginnames);
1778 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
1780 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
1781 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
1782 $chbChangeBlockingTime->setSize(10);
1783 $chbChangeBlockingTime->setMaxLength(10);
1784 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
1786 $la =
new ilCheckboxInputGUI($this->lng->txt(
'usr_letter_avatars'),
'letter_avatars');
1788 $la->setInfo($this->lng->txt(
'usr_letter_avatars_info'));
1789 $this->form->addItem($la);
1791 $this->form->addCommandButton(
'saveGeneralSettings', $this->lng->txt(
'save'));
1813 $ilias = $DIC[
'ilias'];
1814 $ilTabs = $DIC[
'ilTabs'];
1816 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
1817 $lng->loadLanguageModule(
"administration");
1818 $lng->loadLanguageModule(
"mail");
1819 $lng->loadLanguageModule(
"chatroom");
1821 $ilTabs->activateTab(
'settings');
1822 $ilTabs->activateSubTab(
'standard_fields');
1824 include_once(
"./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
1826 if ($this->confirm_change) {
1827 $tab->setConfirmChange();
1839 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
1840 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
1844 $ilias = $DIC[
'ilias'];
1848 include_once(
"./Services/User/classes/class.ilUserProfile.php");
1850 $up->skipField(
"username");
1851 $field_properties = $up->getStandardFields();
1852 $profile_fields = array_keys($field_properties);
1855 foreach ($profile_fields as $field) {
1856 if (
$_POST[
"chb"][
"required_" . $field] &&
1857 !(
int)
$_POST[
'chb'][
'visib_reg_' . $field]
1869 $this->confirm_change = 1;
1875 $fixed_required_fields = array(
1882 "hits_per_page" => 0,
1884 "hide_own_online_status" => 0
1889 if ($privacy->enabledCourseExport() ==
true &&
1890 $privacy->courseConfirmationRequired() ==
true &&
1892 foreach ($profile_fields as $field) {
1893 if (!$ilias->getSetting(
"usr_settings_course_export_" . $field) &&
$_POST[
"chb"][
"course_export_" . $field] ==
"1") {
1894 #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export')); 1895 #$this->confirm_change = 1; 1896 #$this->settingsObject(); 1903 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
1907 foreach ($profile_fields as $field) {
1913 if (!
$_POST[
"chb"][
"visible_" . $field] && !$field_properties[$field][
"visible_hide"]) {
1914 $ilias->setSetting(
"usr_settings_hide_" . $field,
"1");
1916 $ilias->deleteSetting(
"usr_settings_hide_" . $field);
1919 if (!
$_POST[
"chb"][
"changeable_" . $field] && !$field_properties[$field][
"changeable_hide"]) {
1920 $ilias->setSetting(
"usr_settings_disable_" . $field,
"1");
1922 $ilias->deleteSetting(
"usr_settings_disable_" . $field);
1926 if ((
int)
$_POST[
'chb'][
'visib_reg_' . $field] && !$field_properties[$field][
"visib_reg_hide"]) {
1927 $ilSetting->set(
'usr_settings_visib_reg_' . $field,
'1');
1929 $ilSetting->set(
'usr_settings_visib_reg_' . $field,
'0');
1932 if ((
int)
$_POST[
'chb'][
'visib_lua_' . $field]) {
1933 $ilSetting->set(
'usr_settings_visib_lua_' . $field,
'1');
1935 $ilSetting->set(
'usr_settings_visib_lua_' . $field,
'0');
1938 if ((
int)
$_POST[
'chb'][
'changeable_lua_' . $field]) {
1939 $ilSetting->set(
'usr_settings_changeable_lua_' . $field,
'1');
1941 $ilSetting->set(
'usr_settings_changeable_lua_' . $field,
'0');
1944 if (
$_POST[
"chb"][
"export_" . $field] && !$field_properties[$field][
"export_hide"]) {
1945 $ilias->setSetting(
"usr_settings_export_" . $field,
"1");
1947 $ilias->deleteSetting(
"usr_settings_export_" . $field);
1951 if (
$_POST[
"chb"][
"course_export_" . $field] && !$field_properties[$field][
"course_export_hide"]) {
1952 $ilias->setSetting(
"usr_settings_course_export_" . $field,
"1");
1954 $ilias->deleteSetting(
"usr_settings_course_export_" . $field);
1958 if (
$_POST[
"chb"][
"group_export_" . $field] && !$field_properties[$field][
"group_export_hide"]) {
1959 $ilias->setSetting(
"usr_settings_group_export_" . $field,
"1");
1961 $ilias->deleteSetting(
"usr_settings_group_export_" . $field);
1964 $is_fixed = array_key_exists($field, $fixed_required_fields);
1965 if ($is_fixed && $fixed_required_fields[$field] || !$is_fixed &&
$_POST[
"chb"][
"required_" . $field]) {
1966 $ilias->setSetting(
"require_" . $field,
"1");
1968 $ilias->deleteSetting(
"require_" . $field);
1972 if (
$_POST[
"select"][
"default_hits_per_page"]) {
1973 $ilias->setSetting(
"hits_per_page",
$_POST[
"select"][
"default_hits_per_page"]);
1981 if (
$_POST[
"chb"][
"export_preferences"]) {
1982 $ilias->setSetting(
"usr_settings_export_preferences",
$_POST[
"chb"][
"export_preferences"]);
1984 $ilias->deleteSetting(
"usr_settings_export_preferences");
1987 $ilias->setSetting(
'mail_incoming_mail', (
int)
$_POST[
'select'][
'default_mail_incoming_mail']);
1988 $ilias->setSetting(
'chat_osc_accept_msg',
ilUtil::stripSlashes($_POST[
'select'][
'default_chat_osc_accept_msg']));
1989 $ilias->setSetting(
'bs_allow_to_contact_me',
ilUtil::stripSlashes($_POST[
'select'][
'default_bs_allow_to_contact_me']));
1990 $ilias->setSetting(
'hide_own_online_status',
ilUtil::stripSlashes($_POST[
'select'][
'default_hide_own_online_status']));
1992 ilUtil::sendSuccess($this->lng->txt(
"usr_settings_saved"));
2002 $action[-1] = $this->lng->txt(
'all_users');
2003 $action[1] = $this->lng->txt(
'usr_active_only');
2004 $action[0] = $this->lng->txt(
'usr_inactive_only');
2005 $action[2] = $this->lng->txt(
'usr_limited_access_only');
2006 $action[3] = $this->lng->txt(
'usr_without_courses');
2007 $action[4] = $this->lng->txt(
'usr_filter_lastlogin');
2008 $action[5] = $this->lng->txt(
"usr_filter_coursemember");
2009 $action[6] = $this->lng->txt(
"usr_filter_groupmember");
2010 $action[7] = $this->lng->txt(
"usr_filter_role");
2023 if (!isset(
$_POST[
"file"])) {
2024 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->
ilias->error_obj->MESSAGE);
2027 if (count(
$_POST[
"file"]) > 1) {
2028 $this->
ilias->raiseError($this->lng->txt(
"select_max_one_item"), $this->
ilias->error_obj->MESSAGE);
2031 $file = basename(
$_POST[
"file"][0]);
2033 $export_dir = $this->
object->getExportDirectory();
2042 if (!isset(
$_POST[
"file"])) {
2043 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->
ilias->error_obj->MESSAGE);
2047 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2049 $cgui->setFormAction($this->ctrl->getFormAction($this));
2050 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
2051 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteExportFile");
2052 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteExportFile");
2055 foreach (
$_POST[
"file"] as $file) {
2056 $cgui->addItem(
"file[]", $file, $file, ilObject::_getIcon($this->object->getId()), $this->lng->txt(
"obj_usrf"));
2059 $this->tpl->setContent($cgui->getHTML());
2068 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2077 $export_dir = $this->
object->getExportDirectory();
2078 foreach (
$_POST[
"file"] as $file) {
2079 $file = basename($file);
2081 $exp_file = $export_dir .
"/" . $file;
2082 if (@is_file($exp_file)) {
2086 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2103 $ilias = $DIC[
'ilias'];
2106 if (
$_POST[
"cmd"][
"export"]) {
2107 $this->
object->buildExportFile(
$_POST[
"export_type"]);
2108 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2112 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_export.html',
'Services/User');
2114 $export_types = array(
2115 "userfolder_export_excel_x86",
2116 "userfolder_export_csv",
2117 "userfolder_export_xml" 2121 include_once(
"./Services/Table/classes/class.ilTableGUI.php");
2125 $this->tpl->addBlockfile(
"EXPORT_FILES",
"export_files",
"tpl.table.html");
2128 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.usr_export_file_row.html",
"Services/User");
2132 $tbl->setTitle($this->lng->txt(
"userfolder_export_files"));
2134 $tbl->setHeaderNames(array(
"", $this->lng->txt(
"userfolder_export_file"),
2135 $this->lng->txt(
"userfolder_export_file_size"), $this->lng->txt(
"date") ));
2136 $tbl->setHeaderVars(array(),
$ilCtrl->getParameterArray($this,
"export"));
2138 $tbl->enabled[
"sort"] =
false;
2139 $tbl->setColumnWidth(array(
"1%",
"49%",
"25%",
"25%"));
2143 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
2146 $tbl->setMaxCount($this->maxcount);
2149 $this->tpl->setVariable(
"COLUMN_COUNTS", 4);
2153 $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
2154 $this->tpl->setCurrentBlock(
"tbl_action_btn");
2155 $this->tpl->setVariable(
"BTN_NAME",
"confirmDeleteExportFile");
2156 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
2157 $this->tpl->parseCurrentBlock();
2159 $this->tpl->setCurrentBlock(
"tbl_action_btn");
2160 $this->tpl->setVariable(
"BTN_NAME",
"downloadExportFile");
2161 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
2162 $this->tpl->parseCurrentBlock();
2165 $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
2168 $export_files = $this->
object->getExportFiles();
2170 $tbl->setMaxCount(count($export_files));
2171 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
2175 if (count($export_files) > 0) {
2177 foreach ($export_files as $exp_file) {
2178 $this->tpl->setCurrentBlock(
"tbl_content");
2179 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"filename"]);
2182 $this->tpl->setVariable(
"CSS_ROW", $css_row);
2184 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"filesize"]);
2185 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"filename"]);
2187 $file_arr = explode(
"__", $exp_file[
"filename"]);
2190 $this->tpl->parseCurrentBlock();
2193 $this->tpl->setCurrentBlock(
"selectall");
2194 $this->tpl->setVariable(
"SELECT_ALL", $this->lng->txt(
"select_all"));
2195 $this->tpl->setVariable(
"CSS_ROW", $css_row);
2196 $this->tpl->parseCurrentBlock();
2209 $this->tpl->parseCurrentBlock();
2212 foreach ($export_types as $export_type) {
2213 $this->tpl->setCurrentBlock(
"option");
2214 $this->tpl->setVariable(
"OPTION_VALUE", $export_type);
2215 $this->tpl->setVariable(
"OPTION_TEXT", $this->lng->txt($export_type));
2216 $this->tpl->parseCurrentBlock();
2219 $this->tpl->setVariable(
"EXPORT_BUTTON", $this->lng->txt(
"create_export_file"));
2220 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2230 $lng->loadLanguageModule(
"meta");
2231 $lng->loadLanguageModule(
"mail");
2233 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2238 $form->setTitle(
$lng->txt(
"user_new_account_mail"));
2239 $form->setDescription(
$lng->txt(
"user_new_account_mail_desc"));
2241 $langs =
$lng->getInstalledLanguages();
2242 foreach ($langs as $lang_key) {
2243 $amail = $this->
object->_lookupNewAccountMail($lang_key);
2246 if ($lang_key ==
$lng->getDefaultLanguage()) {
2256 $subj->
setValue($amail[
"subject"]);
2257 $form->addItem($subj);
2259 $salg =
new ilTextInputGUI(
$lng->txt(
"mail_salutation_general"),
"sal_g_" . $lang_key);
2262 $form->addItem($salg);
2264 $salf =
new ilTextInputGUI(
$lng->txt(
"mail_salutation_female"),
"sal_f_" . $lang_key);
2267 $form->addItem($salf);
2272 $form->addItem($salm);
2278 $body->setCols(100);
2279 $form->addItem($body);
2282 $att->setAllowDeletion(
true);
2283 if ($amail[
"att_file"]) {
2284 $att->
setValue($amail[
"att_file"]);
2286 $form->addItem($att);
2289 $form->addCommandButton(
"saveNewAccountMail",
$lng->txt(
"save"));
2290 $form->addCommandButton(
"cancelNewAccountMail",
$lng->txt(
"cancel"));
2305 $this->tabs_gui->setTabActive(
'settings');
2306 $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
2310 $ftpl =
new ilTemplate(
'tpl.usrf_new_account_mail.html',
true,
true,
'Services/User');
2311 $ftpl->setVariable(
"FORM",
$form->getHTML());
2315 $ftpl->setVariable(
"TXT_USE_PLACEHOLDERS",
$lng->txt(
"mail_nacc_use_placeholder"));
2316 $ftpl->setVariable(
"TXT_MAIL_SALUTATION",
$lng->txt(
"mail_nacc_salutation"));
2317 $ftpl->setVariable(
"TXT_FIRST_NAME",
$lng->txt(
"firstname"));
2318 $ftpl->setVariable(
"TXT_LAST_NAME",
$lng->txt(
"lastname"));
2319 $ftpl->setVariable(
"TXT_EMAIL",
$lng->txt(
"email"));
2320 $ftpl->setVariable(
"TXT_LOGIN",
$lng->txt(
"mail_nacc_login"));
2321 $ftpl->setVariable(
"TXT_PASSWORD",
$lng->txt(
"password"));
2322 $ftpl->setVariable(
"TXT_PASSWORD_BLOCK",
$lng->txt(
"mail_nacc_pw_block"));
2323 $ftpl->setVariable(
"TXT_NOPASSWORD_BLOCK",
$lng->txt(
"mail_nacc_no_pw_block"));
2324 $ftpl->setVariable(
"TXT_ADMIN_MAIL",
$lng->txt(
"mail_nacc_admin_mail"));
2325 $ftpl->setVariable(
"TXT_ILIAS_URL",
$lng->txt(
"mail_nacc_ilias_url"));
2326 $ftpl->setVariable(
"TXT_CLIENT_NAME",
$lng->txt(
"mail_nacc_client_name"));
2327 $ftpl->setVariable(
"TXT_TARGET",
$lng->txt(
"mail_nacc_target"));
2328 $ftpl->setVariable(
"TXT_TARGET_TITLE",
$lng->txt(
"mail_nacc_target_title"));
2329 $ftpl->setVariable(
"TXT_TARGET_TYPE",
$lng->txt(
"mail_nacc_target_type"));
2330 $ftpl->setVariable(
"TXT_TARGET_BLOCK",
$lng->txt(
"mail_nacc_target_block"));
2331 $ftpl->setVariable(
"TXT_IF_TIMELIMIT",
$lng->txt(
"mail_nacc_if_timelimit"));
2332 $ftpl->setVariable(
"TXT_TIMELIMIT",
$lng->txt(
"mail_nacc_timelimit"));
2334 $this->tpl->setContent($ftpl->get());
2339 $this->ctrl->redirect($this,
"settings");
2348 $langs =
$lng->getInstalledLanguages();
2349 foreach ($langs as $lang_key) {
2350 $this->
object->_writeNewAccountMail(
2359 if ($_FILES[
"att_" . $lang_key][
"tmp_name"]) {
2360 $this->
object->_updateAccountMailAttachment(
2362 $_FILES[
"att_" . $lang_key][
"tmp_name"],
2363 $_FILES[
"att_" . $lang_key][
"name"]
2367 if (
$_POST[
"att_" . $lang_key .
"_delete"]) {
2368 $this->
object->_deleteAccountMailAttachment($lang_key);
2372 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2373 $this->ctrl->redirect($this,
"newAccountMail");
2388 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
2392 $rbacsystem = $DIC[
'rbacsystem'];
2394 if ($rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
2395 $this->tabs_gui->addTarget(
2397 $this->ctrl->getLinkTarget($this,
"view"),
2398 array(
"view",
"delete",
"resetFilter",
"userAction",
""),
2403 $this->tabs_gui->addTarget(
2404 "search_user_extended",
2405 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''),
2407 "ilrepositorysearchgui",
2412 if ($rbacsystem->checkAccess(
"write", $this->object->getRefId())) {
2413 $this->tabs_gui->addTarget(
2415 $this->ctrl->getLinkTarget($this,
"generalSettings"),
2416 array(
'settings',
'generalSettings',
'listUserDefinedField',
'newAccountMail')
2419 $this->tabs_gui->addTarget(
2421 $this->ctrl->getLinkTarget($this,
"export"),
2437 if ($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
2438 $this->tabs_gui->addTarget(
2440 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2441 array(
"perm",
"info",
"owner"),
2455 $rbacsystem = $DIC[
'rbacsystem'];
2460 $this->tabs_gui->addSubTabTarget(
2462 $this->ctrl->getLinkTarget($this,
'generalSettings'),
2466 $this->tabs_gui->addSubTabTarget(
2468 $this->ctrl->getLinkTarget($this,
'settings'),
2469 array(
"settings",
"saveGlobalUserSettings"),
2472 $this->tabs_gui->addSubTabTarget(
2473 "user_defined_fields",
2474 $this->ctrl->getLinkTargetByClass(
"ilcustomuserfieldsgui",
"listUserDefinedFields"),
2475 "listUserDefinedFields",
2478 $this->tabs_gui->addSubTabTarget(
2479 "user_new_account_mail",
2480 $this->ctrl->getLinkTarget($this,
'newAccountMail'),
2485 $this->tabs_gui->addSubTabTarget(
2487 $this->ctrl->getLinkTargetByClass(
"iluserstartingpointgui",
"startingPoints"),
2493 $this->tabs_gui->addSubTabTarget(
2494 "user_profile_info",
2495 $this->ctrl->getLinkTargetByClass(
"ilUserProfileInfoSettingsGUI",
''),
2497 "ilUserProfileInfoSettingsGUI" 2500 #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"), 2501 # $this->ctrl->getLinkTargetByClass("ilaccountcodesgui")); 2512 $show_blocking_time_in_days = (int)
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
2515 $this->loginSettingsForm->setValuesByArray(array(
2516 'allow_change_loginname' => (
bool)
$ilSetting->get(
'allow_change_loginname'),
2517 'create_history_loginname' => (bool)
$ilSetting->get(
'create_history_loginname'),
2518 'reuse_of_loginnames' => (bool)
$ilSetting->get(
'reuse_of_loginnames'),
2519 'loginname_change_blocking_time' => (float) $show_blocking_time_in_days
2522 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2528 $this->tabs_gui->setTabActive(
'settings');
2529 $this->tabs_gui->setSubTabActive(
'loginname_settings');
2531 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2533 $this->loginSettingsForm->
setFormAction($this->ctrl->getFormAction($this,
'saveLoginnameSettings'));
2534 $this->loginSettingsForm->setTitle($this->lng->txt(
'loginname_settings'));
2536 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
2538 $this->loginSettingsForm->addItem($chbChangeLogin);
2539 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
2540 $chbCreateHistory->
setInfo($this->lng->txt(
'loginname_history_info'));
2541 $chbCreateHistory->setValue(1);
2542 $chbChangeLogin->addSubItem($chbCreateHistory);
2543 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
2545 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2546 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2547 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
2549 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
2550 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
2551 $chbChangeBlockingTime->setSize(10);
2552 $chbChangeBlockingTime->setMaxLength(10);
2553 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2555 $this->loginSettingsForm->addCommandButton(
'saveLoginnameSettings', $this->lng->txt(
'save'));
2566 if ($this->loginSettingsForm->checkInput()) {
2569 if (!strlen($this->loginSettingsForm->getInput(
'loginname_change_blocking_time'))) {
2571 $this->loginSettingsForm->getItemByPostVar(
'loginname_change_blocking_time')
2572 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
2576 $save_blocking_time_in_seconds = (int) $this->loginSettingsForm->getInput(
'loginname_change_blocking_time') * 86400;
2578 $ilSetting->set(
'allow_change_loginname', (
int) $this->loginSettingsForm->getInput(
'allow_change_loginname'));
2579 $ilSetting->set(
'create_history_loginname', (
int) $this->loginSettingsForm->getInput(
'create_history_loginname'));
2580 $ilSetting->set(
'reuse_of_loginnames', (
int) $this->loginSettingsForm->getInput(
'reuse_of_loginnames'));
2581 $ilSetting->set(
'loginname_change_blocking_time', (
int) $save_blocking_time_in_seconds);
2583 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
2590 $this->loginSettingsForm->setValuesByPost();
2592 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2602 $ilAccess = $DIC[
'ilAccess'];
2608 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2609 ilUtil::redirect(
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" . $a_target .
"&jmpToUser=" . $a_user);
2612 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
2614 $lng->txt(
"msg_no_perm_read_item"),
2633 $ilCtrl->setParameterByClass(
"ilobjusergui",
"obj_id", (
int) $_GET[
"jmpToUser"]);
2634 $ilCtrl->redirectByClass(
"ilobjusergui",
"view");
2643 if (!count((array) $a_usr_ids)) {
2648 $_POST[
'id'] = $a_usr_ids;
2651 if (stristr($a_cmd,
"export")) {
2652 $cmd = $a_cmd .
"Object";
2653 return $this->$cmd();
2656 $_POST[
'selectedAction'] = $a_cmd;
2664 $rbacsystem = $DIC[
'rbacsystem'];
2668 if ($a_search_form) {
2670 'activate' => $this->lng->txt(
'activate'),
2671 'deactivate' => $this->lng->txt(
'deactivate'),
2672 'accessRestrict' => $this->lng->txt(
'accessRestrict'),
2673 'accessFree' => $this->lng->txt(
'accessFree')
2676 if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
2677 $cmds[
"delete"] = $this->lng->txt(
"delete");
2683 'activateUsers' => $this->lng->txt(
'activate'),
2684 'deactivateUsers' => $this->lng->txt(
'deactivate'),
2685 'restrictAccess' => $this->lng->txt(
'accessRestrict'),
2686 'freeAccess' => $this->lng->txt(
'accessFree')
2689 if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
2690 $cmds[
"deleteUsers"] = $this->lng->txt(
"delete");
2695 $export_types = array(
"userfolder_export_excel_x86",
"userfolder_export_csv",
"userfolder_export_xml");
2696 foreach ($export_types as
$type) {
2697 $cmd = explode(
"_", $type);
2698 $cmd = array_pop($cmd);
2699 $cmds[
'usrExport' . ucfirst($cmd)] = $this->lng->txt(
'export') .
' - ' .
2700 $this->lng->txt($type);
2704 include_once
"Services/Mail/classes/class.ilMail.php";
2706 if ($rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2707 $cmds[
"mail"] = $this->lng->txt(
"send_mail");
2710 $cmds[
'addToClipboard'] = $this->lng->txt(
'clipboard_add_btn');
2722 $this->
object->buildExportFile(
"userfolder_export_excel_x86", $user_ids);
2723 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2733 $this->
object->buildExportFile(
"userfolder_export_csv", $user_ids);
2734 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2744 $this->
object->buildExportFile(
"userfolder_export_xml", $user_ids);
2745 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2761 include_once
"Services/Contact/classes/class.ilMailingLists.php";
2763 $list->deleteTemporaryLists();
2766 include_once
"Services/Contact/classes/class.ilMailingList.php";
2769 $list->setTitle(
"-TEMPORARY SYSTEM LIST-");
2770 $list->setDescription(
"-USER ACCOUNTS MAIL-");
2771 $list->setCreateDate(date(
"Y-m-d H:i:s"));
2773 $list_id =
$list->getId();
2776 foreach ($user_ids as $user_id) {
2777 $list->assignUser($user_id);
2780 include_once
"Services/Mail/classes/class.ilFormatMail.php";
2784 if (!is_array($mail_data)) {
2785 $mail_data = array(
"user_id" =>
$ilUser->getId());
2792 $mail_data[
'user_id'],
2793 $mail_data[
'attachments'],
2794 '#il_ml_' . $list_id,
2795 $mail_data[
'rcp_cc'],
2796 $mail_data[
'rcp_bcc'],
2797 $mail_data[
'm_type'],
2798 $mail_data[
'm_email'],
2799 $mail_data[
'm_subject'],
2800 $mail_data[
'm_message'],
2801 $mail_data[
'use_placeholders'],
2802 $mail_data[
'tpl_ctx_id'],
2803 $mail_data[
'tpl_ctx_params']
2806 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
2813 'type' =>
'search_res' 2821 switch ($a_form_id) {
2824 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2834 'ps_password_min_length' => (
int) $security->getPasswordMinLength(),
2835 'ps_password_max_length' => (int) $security->getPasswordMaxLength(),
2836 'ps_password_uppercase_chars_num' => (int) $security->getPasswordNumberOfUppercaseChars(),
2837 'ps_password_lowercase_chars_num' => (int) $security->getPasswordNumberOfLowercaseChars(),
2838 'ps_password_max_age' => (int) $security->getPasswordMaxAge()
2840 $fields[
'ps_password_settings'] = array(null, null, $subitems);
2843 'ps_login_max_attempts' => (
int) $security->getLoginMaxAttempts(),
2846 $fields[
'ps_security_protection'] = array(null, null, $subitems);
2848 return array(array(
"generalSettings", $fields));
2857 $this->ctrl->redirect($this,
'view');
2859 include_once
'./Services/User/classes/class.ilUserClipboard.php';
2864 ilUtil::sendSuccess($this->lng->txt(
'clipboard_user_added'),
true);
2865 $this->ctrl->redirect($this,
'view');
showLoginnameSettingsObject()
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet ...
setSubTabs($a_tab)
set sub tabs
static makeDirParents($a_dir)
Create a new directory and all parent directories.
This class represents an option in a radio group.
GUI class for account codes.
static _isSearchable($a_key)
if(isset($_REQUEST['delete'])) $list
importUsersObject()
import users
__buildUserFilterSelect()
build select form to distinguish between active and non-active users
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
setValue($a_value)
Set Value.
static getInstance($a_usr_id)
Get singelton instance.
addToExternalSettingsForm($a_form_id)
getImportDir()
get user import directory name
static _goto($a_user)
goto target group
confirmdeleteObject()
confirm delete Object
cancelSearchActionObject()
importUserRoleAssignmentObject()
display form for user import
freeAccessObject()
Free access.
if(!array_key_exists('StateId', $_REQUEST)) $id
setValue($a_value)
Set Value.
activateUsersObject()
Activate users.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
initFormGeneralSettings()
init general settings form
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
chooseLetterObject()
Choose first letter.
settingsObject()
Global user settings.
Learning progress account list for user administration.
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
applyFilterObject()
Apply filter.
static _lookupTitle($a_id)
lookup object title
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor public.
viewObject()
list childs of current object
exportObject()
Global user settings.
const SESSION_HANDLING_FIXED
setInfo($a_info)
Set Info.
static _reset()
Reset all.
importCancelledObject()
import cancelled
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAssignUsersStatus($a_role_id)
importUserFormObject()
display form for user import
generalSettingsObject()
Show user account general settings.
confirmaccessRestrictObject()
Auto completion class for user lists.
restrictAccessObject()
Restrict access.
User profile info settings UI class.
getActionUserIds()
Get selected items for table action.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
saveGlobalUserSettingsObject($action="")
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
confirmaccessFreeObject()
TableGUI class for user administration.
static updateLimitLog($a_new_value)
Log max session setting.
prepareOutput($a_show_subobjects=true)
prepare output
deleteUsersObject()
Delete users.
Class ilMailRfc822AddressParserFactory.
static _enabledLearningProgress()
check wether learing progress is enabled or not
Class ilCustomUserFieldsGUI.
deactivateUsersObject()
Deactivate users.
static _saveStatus($a_key, $a_enabled)
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
saveGeneralSettingsObject()
Save user account settings.
if(isset($_POST['submit'])) $form
static _lookupNewAccountMail($a_lang)
Class ilUserStartingPointGUI.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
confirmDeleteExportFileObject()
confirmation screen for export file deletion
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
cancelDeleteExportFileObject()
cancel deletion of export files
deleteExportFileObject()
delete export files
getUserMultiCommands($a_search_form=false)
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
showActions($with_subobjects=false)
show possible action (form buttons)
redirection script todo: (a better solution should control the processing via a xml file) ...
newAccountMailObject()
new account mail administration
setMaxLength($a_maxlength)
Set Max Length.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
confirmdeactivateObject()
Set the selected users inactive.
savePostData( $a_user_id, $a_attachments, $a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_m_type, $a_m_email, $a_m_subject, $a_m_message, $a_use_placeholders, $a_tpl_context_id=null, $a_tpl_ctx_params=array())
save post data in table public
jumpToUserObject()
Jump to edit screen for user.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
downloadExportFileObject()
Download selected export files.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
saveLoginnameSettingsObject()
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
initAccessRestrictionForm($a_from_search=false)
static getDataDir()
get data directory (outside webspace)
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.
This class represents a non editable value in a property form.
static getInstance()
Singelton get instance.
This class represents a text area property in a property form.
addUserObject()
Add new user;.
static getFirstLettersOfLastnames()
Get first letters of all lastnames.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
cancelNewAccountMailObject()
searchResultHandler($a_usr_ids, $a_cmd)
Handles multi command from repository search gui.
Class ilObjUserFolderGUI.
const USER_FOLDER_ID
Class ilObjUserFolder.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
const SESSION_HANDLING_LOAD_DEPENDENT
static _getInstance()
Get instance of ilPrivacySettings.
const DEFAULT_ALLOW_CLIENT_MAINTENANCE
cancelUserFolderActionObject()
setValue($a_value)
Set Value.
static redirect($a_script)
static getSessionExpireValue()
Returns the session expiration value.
initUserImportForm()
Init user import form.
confirmactivateObject()
Set the selected users active.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static _getInstance()
Get instance of ilSecuritySettings.
saveNewAccountMailObject()
viewObject($reset_filter=false)
list users
const DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST
const IL_UPDATE_ON_CONFLICT
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
const IL_IGNORE_ON_CONFLICT
setAccessRestrictionObject($a_form=null, $a_from_search=false)
Confirmation screen class.
addUserAutoCompleteObject()
Show auto complete results.