4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
32 define(
'USER_FOLDER_ID',7);
35 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
37 $this->lng->loadLanguageModule(
'search');
38 $this->lng->loadLanguageModule(
"user");
40 $ilCtrl->saveParameter($this,
"letter");
45 $this->user_owner_id = $a_id;
49 return $this->user_owner_id ? $this->user_owner_id :
USER_FOLDER_ID;
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
62 case 'ilusertablegui':
63 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
65 $u_table->initFilter();
66 $this->ctrl->setReturn($this,
'view');
67 $this->ctrl->forwardCommand($u_table);
70 case 'ilpermissiongui':
71 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
73 $ret =& $this->ctrl->forwardCommand($perm_gui);
76 case 'ilrepositorysearchgui':
77 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
79 $user_search->setTitle($this->lng->txt(
"search_user_extended"));
80 $user_search->enableSearchableCheck(
false);
81 $user_search->setCallback(
83 'searchResultHandler',
86 $this->tabs_gui->setTabActive(
'search_user_extended');
87 $this->ctrl->setReturn($this,
'view');
88 $ret =& $this->ctrl->forwardCommand($user_search);
91 case 'ilaccountcodesgui':
92 $this->tabs_gui->setTabActive(
'settings');
94 $ilTabs->activateSubTab(
"account_codes");
95 include_once(
"./Services/User/classes/class.ilAccountCodesGUI.php");
97 $this->ctrl->forwardCommand($acc);
100 case 'ilcustomuserfieldsgui':
101 $this->tabs_gui->setTabActive(
'settings');
103 $ilTabs->activateSubTab(
"user_defined_fields");
104 include_once(
"./Services/User/classes/class.ilCustomUserFieldsGUI.php");
106 $this->ctrl->forwardCommand($cf);
125 global $rbacsystem,
$tpl;
130 if (!$rbacsystem->checkAccess(
"read",$this->object->getRefId()) ||
134 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
137 include_once
"Services/User/classes/class.ilUserLPTableGUI.php";
138 $tbl =
new ilUserLPTableGUI($this,
"learningProgress", $this->object->getRefId());
140 $tpl->setContent($tbl->getHTML());
149 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
151 $utab->resetOffset();
152 $utab->resetFilter();
165 $ilCtrl->setParameterByClass(
"ilobjusergui",
"new_type",
"usr");
166 $ilCtrl->redirectByClass(array(
"iladministrationgui",
"ilobjusergui"),
"create");
177 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
179 $utab->resetOffset();
180 $utab->writeFilterToSession();
182 $ilTabs->activateTab(
"usrf");
194 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
196 if ($rbacsystem->checkAccess(
'create_usr', $this->object->getRefId()) ||
197 $rbacsystem->checkAccess(
'cat_administrate_users', $this->object->getRefId()))
200 $button->setCaption(
"usr_add");
201 $button->setUrl($this->ctrl->getLinkTarget($this,
"addUser"));
202 $ilToolbar->addButtonInstance($button);
205 $button->setCaption(
"import_users");
206 $button->setUrl($this->ctrl->getLinkTarget($this,
"importUserForm"));
207 $ilToolbar->addButtonInstance($button);
211 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
213 if ((
int) $ilSetting->get(
'user_adm_alpha_nav'))
215 $ilToolbar->addSeparator();
218 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
220 include_once(
"./Services/User/classes/class.ilObjUser.php");
226 $ai->setParentCommand($this,
"chooseLetter");
227 $ai->setHighlighted(
$_GET[
"letter"]);
228 $ilToolbar->addInputItem($ai,
true);
232 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
234 $tpl->setContent($utab->getHTML());
242 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
244 $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
245 $auto->enableFieldSearchableCheck(
false);
246 $auto->setMoreLinkAvailable(
true);
267 $ilCtrl->redirect($this,
"view");
281 $operations = array();
283 if ($this->actions ==
"")
286 "delete" => array(
"name" =>
"delete",
"lng" =>
"delete"),
287 "activate" => array(
"name" =>
"activate",
"lng" =>
"activate"),
288 "deactivate" => array(
"name" =>
"deactivate",
"lng" =>
"deactivate"),
289 "accessRestrict" => array(
"name" =>
"accessRestrict",
"lng" =>
"accessRestrict"),
290 "accessFree" => array(
"name" =>
"accessFree",
"lng" =>
"accessFree"),
291 "export" => array(
"name" =>
"export",
"lng" =>
"export")
300 if ($rbacsystem->checkAccess($row[
"name"],$this->object->getRefId()))
302 $operations[] =
$row;
306 if (count($operations) > 0)
308 $select =
"<select name=\"selectedAction\">\n";
309 foreach ($operations as $val)
311 $select .=
"<option value=\"" . $val[
"name"] .
"\"";
312 if (strcmp(
$_POST[
"selectedAction"], $val[
"name"]) == 0)
314 $select .=
" selected=\"selected\"";
317 $select .= $this->lng->txt($val[
"lng"]);
318 $select .=
"</option>";
320 $select .=
"</select>";
321 $this->tpl->setCurrentBlock(
"tbl_action_select");
322 $this->tpl->setVariable(
"SELECT_ACTION", $select);
323 $this->tpl->setVariable(
"BTN_NAME",
"userAction");
324 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"submit"));
325 $this->tpl->parseCurrentBlock();
328 if ($with_subobjects ===
true)
333 if ((count($operations) > 0) or $subobjs ===
true)
335 $this->tpl->setCurrentBlock(
"tbl_action_row");
336 $this->tpl->setVariable(
"COLUMN_COUNTS",count($this->data[
"cols"]));
338 $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
339 $this->tpl->parseCurrentBlock();
353 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
355 if (!$rbacsystem->checkAccess(
'create_usr',$this->object->getRefId()))
368 for ($i=0; $i<count($this->data[
"ctrl"]); $i++)
370 if ($this->data[
"ctrl"][$i][
"type"] == $row[
"name"])
376 if ($row[
"max"] ==
"" || $count < $row[
"max"])
378 $subobj[] = $row[
"name"];
383 if (is_array($subobj))
387 $this->tpl->setCurrentBlock(
"add_object");
388 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
389 $this->tpl->setVariable(
"BTN_NAME",
"create");
390 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
391 $this->tpl->parseCurrentBlock();
401 $this->ctrl->redirect($this,
'view');
406 $this->ctrl->redirectByClass(
'ilrepositorysearchgui',
'showSearchResults');
419 if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
421 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->WARNING);
425 foreach (
$_POST[
"id"] as $id)
428 $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
429 $obj->setActive(TRUE, $ilUser->getId());
437 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
441 $this->ctrl->redirect($this,
"view");
455 if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
457 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->WARNING);
461 foreach (
$_POST[
"id"] as $id)
464 $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
465 $obj->setActive(FALSE, $ilUser->getId());
474 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
478 $this->ctrl->redirect($this,
"view");
487 if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
489 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->WARNING);
493 foreach (
$_POST[
"id"] as $id)
496 $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
497 $obj->setTimeLimitUnlimited(1);
498 $obj->setTimeLimitFrom(
"");
499 $obj->setTimeLimitUntil(
"");
500 $obj->setTimeLimitMessage(0);
509 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
513 $this->ctrl->redirect($this,
"view");
523 $this->tpl->setContent($a_form->getHTML());
538 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
540 $form->setTitle($this->lng->txt(
"time_limit_add_time_limit_for_selected"));
541 $form->setFormAction($this->ctrl->getFormAction($this,
"confirmaccessRestrict"));
545 $from->setRequired(
true);
546 $form->addItem($from);
550 $to->setShowTime(
true);
553 $form->addCommandButton(
"confirmaccessRestrict", $this->lng->txt(
"confirm"));
554 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
556 foreach($user_ids as $user_id)
559 $ufield->setValue($user_id);
560 $form->addItem($ufield);
564 if($a_from_search ||
$_POST[
"frsrch"])
568 $form->addItem($field);
577 if(!$form->checkInput())
582 $timefrom = $form->getItemByPostVar(
"from")->getDate()->get(
IL_CAL_UNIX);
583 $timeuntil = $form->getItemByPostVar(
"to")->getDate()->get(
IL_CAL_UNIX);
584 if ($timeuntil <= $timefrom)
593 if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
595 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->WARNING);
599 foreach (
$_POST[
"id"] as $id)
602 $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
603 $obj->setTimeLimitUnlimited(0);
604 $obj->setTimeLimitFrom($timefrom);
605 $obj->setTimeLimitUntil($timeuntil);
606 $obj->setTimeLimitMessage(0);
615 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
619 $this->ctrl->redirect($this,
"view");
633 if (!$rbacsystem->checkAccess(
'delete',$this->object->getRefId()))
636 $ilCtrl->redirect($this,
"view");
639 if (in_array($ilUser->getId(),
$_POST[
"id"]))
641 $this->
ilias->raiseError($this->lng->txt(
"msg_no_delete_yourself"),$this->
ilias->error_obj->WARNING);
645 foreach (
$_POST[
"id"] as $id)
648 $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
657 $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');
661 $this->ctrl->redirect($this,
"view");
672 if(
$_POST[
"select_cmd_all"])
674 include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
676 return $utab->getUserIdsForFilter();
694 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
699 $ilTabs->activateTab(
"obj_usrf");
703 $ilTabs->activateTab(
"search_user_extended");
706 if (strcmp($action,
"accessRestrict") == 0)
710 if (strcmp($action,
"mail") == 0)
719 $cancel =
"cancelUserFolderAction";
723 $cancel =
"cancelSearchAction";
727 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
729 $cgui->setFormAction($this->ctrl->getFormAction($this));
730 $cgui->setHeaderText($this->lng->txt(
"info_" . $action .
"_sure"));
731 $cgui->setCancel($this->lng->txt(
"cancel"), $cancel);
732 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirm" . $action);
736 $cgui->addHiddenItem(
"frsrch", 1);
739 foreach($user_ids as $id)
743 $login = $user->getLastLogin();
746 $login = $this->lng->txt(
"never");
753 $caption = $user->getFullname().
" (".$user->getLogin().
")".
", ".
754 $user->getEmail().
" - ".$this->lng->txt(
"last_login").
": ".$login;
756 $cgui->addItem(
"id[]", $id, $caption);
759 $this->tpl->setContent($cgui->getHTML());
769 $_POST[
"selectedAction"] =
"delete";
778 $_POST[
"selectedAction"] =
"activate";
787 $_POST[
"selectedAction"] =
"deactivate";
796 $_POST[
"selectedAction"] =
"accessRestrict";
805 $_POST[
"selectedAction"] =
"accessFree";
819 global
$tpl, $rbacsystem;
822 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI')
824 $this->tabs_gui->clearTargets();
827 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
829 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
833 $tpl->setContent($this->form->getHTML());
845 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
849 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
854 $this->form->addItem($fi);
856 $this->form->addCommandButton(
"importUserRoleAssignment", $lng->txt(
"import"));
857 $this->form->addCommandButton(
"importCancelled", $lng->txt(
"cancel"));
859 $this->form->setTitle($lng->txt(
"import_users"));
860 $this->form->setFormAction($ilCtrl->getFormAction($this));
873 if (@is_dir($import_dir))
878 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
880 $this->ctrl->redirect($this,
"view");
885 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
898 $importDir =
ilUtil::getDataDir().
'/user_import/usr_'.$ilUser->getId().
'_'.session_id();
911 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI')
913 $this->tabs_gui->clearTargets();
917 if ($this->form->checkInput())
919 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
920 include_once
'./Services/User/classes/class.ilUserImportParser.php';
922 global $rbacreview, $rbacsystem,
$tree,
$lng;
925 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_import_roles.html",
"Services/User");
930 if (@is_dir($import_dir))
937 $file_name = $_FILES[
"importFile"][
"name"];
938 $parts = pathinfo($file_name);
939 $full_path = $import_dir.
"/".$file_name;
942 if (!is_file($_FILES[
"importFile"][
"tmp_name"]))
945 $this->
ilias->raiseError($this->lng->txt(
"no_import_file_found")
946 , $this->
ilias->error_obj->MESSAGE);
949 $_FILES[
"importFile"][
"name"], $full_path);
952 if (strtolower($parts[
"extension"]) ==
"zip")
959 foreach ($file_list as $a_file)
961 if (substr($a_file[
'entry'],-4) ==
'.xml')
963 $xml_file = $import_dir.
"/".$a_file[
'entry'];
967 if (is_null($xml_file))
969 $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
970 $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
976 $xml_file = $full_path;
980 if (!is_file($xml_file))
983 $this->
ilias->raiseError($this->lng->txt(
"no_xml_file_found_in_zip")
984 .
" ".$subdir.
"/".$subdir.
".xml", $this->
ilias->error_obj->MESSAGE);
987 require_once(
"./Services/User/classes/class.ilUserImportParser.php");
992 $importParser->startParsing();
993 switch ($importParser->getErrorLevel())
998 $this->tpl->setVariable(
"IMPORT_LOG", $importParser->getProtocolAsHTML($lng->txt(
"verification_warning_log")));
1002 $this->
ilias->raiseError(
1003 $lng->txt(
"verification_failed").$importParser->getProtocolAsHTML($lng->txt(
"verification_failure_log")),
1004 $this->
ilias->error_obj->MESSAGE
1011 $this->tpl->setCurrentBlock(
"role_selection_form");
1012 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1013 $this->tpl->setVariable(
"TXT_IMPORT_USERS", $this->lng->txt(
"import_users"));
1014 $this->tpl->setVariable(
"TXT_IMPORT_FILE", $this->lng->txt(
"import_file"));
1015 $this->tpl->setVariable(
"IMPORT_FILE", $file_name);
1016 $this->tpl->setVariable(
"TXT_USER_ELEMENT_COUNT", $this->lng->txt(
"num_users"));
1017 $this->tpl->setVariable(
"USER_ELEMENT_COUNT", $importParser->getUserCount());
1018 $this->tpl->setVariable(
"TXT_ROLE_ASSIGNMENT", $this->lng->txt(
"role_assignment"));
1019 $this->tpl->setVariable(
"BTN_IMPORT", $this->lng->txt(
"import"));
1020 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1021 $this->tpl->setVariable(
"XML_FILE_NAME", $xml_file);
1025 $importParser->startParsing();
1026 $roles = $importParser->getCollectedRoles();
1029 $all_gl_roles = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
1030 $gl_roles = array();
1031 $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1032 foreach ($all_gl_roles as $obj_data)
1043 if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
1046 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$roles_of_user))
1048 $gl_roles[$obj_data[
"obj_id"]] = $obj_data[
"title"];
1054 $got_globals =
false;
1055 foreach($roles as $role_id => $role)
1057 if ($role[
"type"] ==
"Global")
1061 $got_globals =
true;
1063 $this->tpl->setCurrentBlock(
"global_role_section");
1064 $this->tpl->setVariable(
"TXT_GLOBAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_global"));
1065 $this->tpl->setVariable(
"TXT_GLOBAL_ROLES", $this->lng->txt(
"assign_global_role"));
1069 $pre_select = array_search($role[name], $gl_roles);
1072 switch($role[
"name"])
1074 case "Administrator":
1075 $pre_select = array_search(
"Administrator", $gl_roles);
1079 $pre_select = array_search(
"User", $gl_roles);
1083 $pre_select = array_search(
"User", $gl_roles);
1087 $pre_select = array_search(
"Guest", $gl_roles);
1091 $pre_select = array_search(
"User", $gl_roles);
1095 $this->tpl->setCurrentBlock(
"global_role");
1096 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[".$role_id.
"]", $gl_roles,
false,
true);
1097 $this->tpl->setVariable(
"TXT_IMPORT_GLOBAL_ROLE", $role[
"name"].
" [".$role_id.
"]");
1098 $this->tpl->setVariable(
"SELECT_GLOBAL_ROLE", $role_select);
1099 $this->tpl->parseCurrentBlock();
1104 $got_locals =
false;
1105 foreach($roles as $role_id => $role)
1107 if ($role[
"type"] ==
"Local")
1116 $this->tpl->setCurrentBlock(
"local_role_section");
1117 $this->tpl->setVariable(
"TXT_LOCAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_local"));
1118 $this->tpl->setVariable(
"TXT_LOCAL_ROLES", $this->lng->txt(
"assign_local_role"));
1129 $loc_roles = array();
1130 foreach($roles as $role_id => $role)
1132 if ($role[
"type"] ==
"Local")
1134 $searchName = (substr($role[
'name'],0,1) ==
'#') ? $role[
'name'] :
'#'.$role[
'name'];
1135 $matching_role_ids = $rbacreview->searchRolesByMailboxAddressList($searchName);
1136 foreach ($matching_role_ids as $mid) {
1137 if (! in_array($mid, $loc_roles)) {
1138 $loc_roles[] = $mid;
1147 $loc_roles = $rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1152 $l_roles_mailbox_searcharray = array();
1153 foreach ($loc_roles as $key => $loc_role)
1156 $rolf = $rbacreview->getFoldersAssignedToRole($loc_role,
true);
1163 !$rbacreview->isDeleted($rolf[0]) &&
1164 $rbacsystem->checkAccess(
'write',$rolf[0]) &&
1165 $rolf[0] != ROLE_FOLDER_ID
1178 $path_array = array();
1179 if ($this->tree->isInTree($rolf[0]))
1183 $tmpPath = $this->tree->getPathFull($rolf[0]);
1184 $tmpPath[] = $rolf[0];
1186 for ($i = 1,
$n = count($tmpPath) - 1; $i <
$n; $i++)
1188 if ($i < 3 || $i > $n - 3)
1190 $path_array[] = $tmpPath[$i][
'title'];
1192 else if ($i == 3 || $i == $n - 3)
1194 $path_array[] =
'...';
1197 $isInSubtree |= $tmpPath[$i][
'obj_id'] == $this->
object->getId();
1200 $path = implode(
" < ", array_reverse($path_array));
1205 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$loc_role.
")</b>";
1207 $roleMailboxAddress = $rbacreview->getRoleMailboxAddress($loc_role);
1208 $l_roles[$loc_role] = $roleMailboxAddress.
', '.
$path;
1213 natcasesort($l_roles);
1214 $l_roles[
""] = $this->lng->txt(
"usrimport_ignore_role");
1215 foreach($roles as $role_id => $role)
1217 if ($role[
"type"] ==
"Local")
1219 $this->tpl->setCurrentBlock(
"local_role");
1220 $this->tpl->setVariable(
"TXT_IMPORT_LOCAL_ROLE", $role[
"name"]);
1221 $searchName = (substr($role[
'name'],0,1) ==
'#') ? $role[
'name'] :
'#'.$role[
'name'];
1222 $matching_role_ids = $rbacreview->searchRolesByMailboxAddressList($searchName);
1223 $pre_select = count($matching_role_ids) == 1 ? $matching_role_ids[0] :
"";
1228 $selectable_roles = array();
1229 $selectable_roles[
""] = $this->lng->txt(
"usrimport_ignore_role");
1230 foreach ($matching_role_ids as $id)
1232 $selectable_roles[$id] = $l_roles[$id];
1234 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[".$role_id.
"]", $selectable_roles,
false,
true);
1236 $role_select =
ilUtil::formSelect($pre_select,
"role_assign[".$role_id.
"]", $l_roles,
false,
true);
1238 $this->tpl->setVariable(
"SELECT_LOCAL_ROLE", $role_select);
1239 $this->tpl->parseCurrentBlock();
1245 $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING", $lng->txt(
"conflict_handling"));
1250 $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING_INFO", str_replace(
'\n',
'<br>',$this->lng->txt(
"usrimport_conflict_handling_info")));
1251 $this->tpl->setVariable(
"TXT_CONFLICT_CHOICE", $lng->txt(
"conflict_handling"));
1255 $this->lng->loadLanguageModule(
"mail");
1256 include_once
'./Services/User/classes/class.ilObjUserFolder.php';
1258 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
1260 $this->tpl->setCurrentBlock(
"inform_user");
1261 $this->tpl->setVariable(
"TXT_ACCOUNT_MAIL", $lng->txt(
"mail_account_mail"));
1264 $this->tpl->setVariable(
"SEND_MAIL",
" checked=\"checked\"");
1266 $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL",
1267 $this->lng->txt(
"user_send_new_account_mail"));
1268 $this->tpl->parseCurrentBlock();
1273 $this->form->setValuesByPost();
1274 $tpl->setContent($this->form->getHtml());
1286 if (
$_GET[
"baseClass"] ==
'ilRepositoryGUI')
1288 $this->tabs_gui->clearTargets();
1291 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1292 include_once
'./Services/User/classes/class.ilUserImportParser.php';
1294 global $rbacreview, $rbacsystem,
$tree,
$lng;
1296 switch (
$_POST[
"conflict_handling_choice"])
1298 case "update_on_conflict" :
1301 case "ignore_on_conflict" :
1313 if (
$_POST[
"role_assign"])
1315 $global_roles = $rbacreview->getGlobalRoles();
1316 $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1317 foreach (
$_POST[
"role_assign"] as $role_id)
1321 if (in_array($role_id, $global_roles))
1323 if(!in_array(SYSTEM_ROLE_ID,$roles_of_user))
1325 if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID,$roles_of_user)
1331 $this->
ilias->raiseError($this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1332 $this->
ilias->error_obj->MESSAGE);
1338 $rolf = $rbacreview->getFoldersAssignedToRole($role_id,
true);
1339 if ($rbacreview->isDeleted($rolf[0])
1340 || ! $rbacsystem->checkAccess(
'write',$rolf[0]))
1343 $this->
ilias->raiseError($this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
1344 $this->
ilias->error_obj->MESSAGE);
1352 $importParser->setRoleAssignment(
$_POST[
"role_assign"]);
1353 $importParser->startParsing();
1358 switch ($importParser->getErrorLevel())
1364 ilUtil::sendInfo($this->lng->txt(
"user_imported_with_warnings").$importParser->getProtocolAsHTML($lng->txt(
"import_warning_log")),
true);
1367 $this->
ilias->raiseError(
1368 $this->lng->txt(
"user_import_failed")
1369 .$importParser->getProtocolAsHTML($lng->txt(
"import_failure_log")),
1370 $this->
ilias->error_obj->MESSAGE
1375 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
1377 $this->ctrl->redirect($this,
"view");
1382 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1389 global $rbacsystem,
$ilias;
1393 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
1395 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
1398 if(!count($app_users =& $ilias->account->getAppliedUsers()))
1405 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_applied_users.html",
"Services/User");
1406 $this->lng->loadLanguageModule(
'crs');
1409 foreach($app_users as $usr_id)
1414 $f_result[$counter][] = $tmp_user->getLogin();
1415 $f_result[$counter][] = $tmp_user->getFirstname();
1416 $f_result[$counter][] = $tmp_user->getLastname();
1418 if($tmp_user->getTimeLimitUnlimited())
1420 $f_result[$counter][] =
"<b>".$this->lng->txt(
'crs_unlimited').
"</b>";
1424 $limit =
"<b>".$this->lng->txt(
'crs_from').
'</b> '.strftime(
"%Y-%m-%d %R",$tmp_user->getTimeLimitFrom()).
'<br />';
1425 $limit .=
"<b>".$this->lng->txt(
'crs_to').
'</b> '.strftime(
"%Y-%m-%d %R",$tmp_user->getTimeLimitUntil());
1427 $f_result[$counter][] = $limit;
1441 if(!$rbacsystem->checkAccess(
"write", $this->ref_id))
1443 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
1446 $this->lng->loadLanguageModule(
'crs');
1450 if(!isset(
$_SESSION[
'error_post_vars']))
1452 ilUtil::sendInfo($this->lng->txt(
'time_limit_add_time_limit_for_selected'));
1455 if(!count(
$_POST[
"users"]))
1464 foreach(
$_POST[
'users'] as $usr_id)
1471 $title .= $tmp_user->getLogin();
1474 if(strlen($title) > 79)
1476 $title = substr($title,0,80);
1481 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_edit_applied_users.html",
"Services/User");
1482 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1485 $time_limit_unlimited =
$_SESSION[
"error_post_vars"][
"au"][
"time_limit_unlimited"] ?
1488 $time_limit_start =
$_SESSION[
"error_post_vars"][
"au"][
"time_limit_start"] ?
1491 $time_limit_end =
$_SESSION[
"error_post_vars"][
"au"][
"time_limit_end"] ?
1497 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
"obj_usr"));
1499 $this->tpl->setVariable(
"TITLE",$title);
1500 $this->tpl->setVariable(
"TXT_TIME_LIMIT",$this->lng->txt(
"time_limit"));
1501 $this->tpl->setVariable(
"TXT_TIME_LIMIT_START",$this->lng->txt(
"crs_start"));
1502 $this->tpl->setVariable(
"TXT_TIME_LIMIT_END",$this->lng->txt(
"crs_end"));
1503 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateAppliedUsers");
1504 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
1505 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"submit"));
1509 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_START_DAY",$this->
__getDateSelect(
"day",
"au[time_limit_start][day]",
1510 date(
"d",$time_limit_start)));
1511 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_START_MONTH",$this->
__getDateSelect(
"month",
"au[time_limit_start][month]",
1512 date(
"m",$time_limit_start)));
1513 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_START_YEAR",$this->
__getDateSelect(
"year",
"au[time_limit_start][year]",
1514 date(
"Y",$time_limit_start)));
1515 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_START_HOUR",$this->
__getDateSelect(
"hour",
"au[time_limit_start][hour]",
1516 date(
"G",$time_limit_start)));
1517 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_START_MINUTE",$this->
__getDateSelect(
"minute",
"au[time_limit_start][minute]",
1518 date(
"i",$time_limit_start)));
1519 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_END_DAY",$this->
__getDateSelect(
"day",
"au[time_limit_end][day]",
1520 date(
"d",$time_limit_end)));
1521 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_END_MONTH",$this->
__getDateSelect(
"month",
"au[time_limit_end][month]",
1522 date(
"m",$time_limit_end)));
1523 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_END_YEAR",$this->
__getDateSelect(
"year",
"au[time_limit_end][year]",
1524 date(
"Y",$time_limit_end)));
1525 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_END_HOUR",$this->
__getDateSelect(
"hour",
"au[time_limit_end][hour]",
1526 date(
"G",$time_limit_end)));
1527 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_END_MINUTE",$this->
__getDateSelect(
"minute",
"au[time_limit_end][minute]",
1528 date(
"i",$time_limit_end)));
1529 if($this->
ilias->account->getTimeLimitUnlimited())
1531 $this->tpl->setVariable(
"ROWSPAN",3);
1532 $this->tpl->setCurrentBlock(
"unlimited");
1533 $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNLIMITED",$this->lng->txt(
"crs_unlimited"));
1534 $this->tpl->setVariable(
"TIME_LIMIT_UNLIMITED",
ilUtil::formCheckbox($time_limit_unlimited,
"au[time_limit_unlimited]",1));
1535 $this->tpl->parseCurrentBlock();
1539 $this->tpl->setVariable(
"ROWSPAN",2);
1547 if(!$rbacsystem->checkAccess(
"write", $this->ref_id))
1549 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
1555 if(!
$_POST[
'au'][
'time_limit_unlimited'])
1566 #if(!$this->ilias->account->getTimeLimitUnlimited()) 1568 # if($start < $this->ilias->account->getTimeLimitFrom() or 1569 # $end > $this->ilias->account->getTimeLimitUntil()) 1571 # $_SESSION['error_post_vars'] = $_POST; 1572 # ilUtil::sendInfo($this->lng->txt('time_limit_not_within_owners')); 1573 # $this->editAppliedUsersObject(); 1579 foreach(
$_SESSION[
'applied_users'] as $usr_id)
1583 $tmp_user->setTimeLimitUnlimited((
int)
$_POST[
'au'][
'time_limit_unlimited']);
1584 $tmp_user->setTimeLimitFrom($start);
1585 $tmp_user->setTimeLimitUntil($end);
1586 $tmp_user->setTimeLimitMessage(0);
1587 $tmp_user->update();
1602 $tpl =& $tbl->getTemplateObject();
1605 $tpl->setCurrentBlock(
"tbl_form_header");
1607 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1608 $tpl->parseCurrentBlock();
1610 $tpl->setCurrentBlock(
"tbl_action_btn");
1611 $tpl->setVariable(
"BTN_NAME",
'editAppliedUsers');
1612 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
'edit'));
1613 $tpl->parseCurrentBlock();
1615 $tpl->setCurrentBlock(
"tbl_action_row");
1616 $tpl->setVariable(
"COLUMN_COUNTS",5);
1618 $tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
1619 $tpl->parseCurrentBlock();
1623 $tbl->setTitle($this->lng->txt(
"time_limit_applied_users"),
"",$this->lng->txt(
"users"));
1624 $tbl->setHeaderNames(array(
'',
1625 $this->lng->txt(
"login"),
1626 $this->lng->txt(
"firstname"),
1627 $this->lng->txt(
"lastname"),
1628 $this->lng->txt(
"time_limits")));
1629 $header_params = $this->ctrl->getParameterArray($this,
"appliedUsers");
1630 $tbl->setHeaderVars(array(
"",
1635 array($header_params));
1636 $tbl->setColumnWidth(array(
"3%",
"19%",
"19%",
"19%",
"40%"));
1642 $this->tpl->setVariable(
"APPLIED_USERS",$tbl->tpl->get());
1649 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1656 $offset =
$_GET[
"offset"];
1657 $order =
$_GET[
"sort_by"];
1658 $direction =
$_GET[
"sort_order"];
1661 $tbl->setOrderColumn($order);
1662 $tbl->setOrderDirection($direction);
1663 $tbl->setOffset($offset);
1664 $tbl->setLimit(
$_GET[
"limit"]);
1665 $tbl->setMaxCount(count($result_set));
1666 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1667 $tbl->setData($result_set);
1675 for($i=0;$i<=60;$i++)
1677 $days[$i] = $i < 10 ?
"0".$i : $i;
1682 for($i=0;$i<24;$i++)
1684 $days[$i] = $i < 10 ?
"0".$i : $i;
1689 for($i=1;$i<32;$i++)
1691 $days[$i] = $i < 10 ?
"0".$i : $i;
1696 for($i=1;$i<13;$i++)
1698 $month[$i] = $i < 10 ?
"0".$i : $i;
1703 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
1712 return mktime($a_time_arr[
"hour"],
1713 $a_time_arr[
"minute"],
1714 $a_time_arr[
"second"],
1715 $a_time_arr[
"month"],
1717 $a_time_arr[
"year"]);
1722 parent::hitsperpageObject();
1736 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1739 $show_blocking_time_in_days = $ilSetting->get(
'loginname_change_blocking_time') / 86400;
1740 $show_blocking_time_in_days = (float)$show_blocking_time_in_days;
1742 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1745 $this->form->setValuesByArray(
1747 'lua' => $aset->isLocalUserAdministrationEnabled(),
1748 'lrua' => $aset->isUserAccessRestricted(),
1749 'allow_change_loginname' => (bool)$ilSetting->get(
'allow_change_loginname'),
1750 'create_history_loginname' => (bool)$ilSetting->get(
'create_history_loginname'),
1751 'reuse_of_loginnames' => (bool)$ilSetting->get(
'reuse_of_loginnames'),
1752 'loginname_change_blocking_time' => (float)$show_blocking_time_in_days,
1753 'user_adm_alpha_nav' => (
int)$ilSetting->get(
'user_adm_alpha_nav'),
1755 'user_reactivate_code' => (int)$ilSetting->get(
'user_reactivate_code'),
1756 'user_own_account' => (int)$ilSetting->get(
'user_delete_own_account'),
1757 'user_own_account_email' => $ilSetting->get(
'user_delete_own_account_email'),
1760 'session_reminder_enabled' => $ilSetting->get(
'session_reminder_enabled'),
1766 'passwd_auto_generate' => (bool)$ilSetting->get(
"passwd_auto_generate"),
1767 'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1768 'password_must_not_contain_loginame' => $security->getPasswordMustNotContainLoginnameStatus() ? 1 : 0,
1769 'password_chars_and_numbers_enabled' => $security->isPasswordCharsAndNumbersEnabled() ? 1 : 0,
1770 'password_special_chars_enabled' => $security->isPasswordSpecialCharsEnabled() ? 1 : 0 ,
1771 'password_min_length' => $security->getPasswordMinLength(),
1772 'password_max_length' => $security->getPasswordMaxLength(),
1773 'password_ucase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
1774 'password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
1775 'password_max_age' => $security->getPasswordMaxAge(),
1777 'login_max_attempts' => $security->getLoginMaxAttempts(),
1778 'ps_prevent_simultaneous_logins' => (int)$security->isPreventionOfSimultaneousLoginsEnabled(),
1779 'password_assistance' => (bool)$ilSetting->get(
"password_assistance")
1783 $this->tpl->setContent($this->form->getHTML());
1796 if($this->form->checkInput())
1800 if(!strlen($this->form->getInput(
'loginname_change_blocking_time')))
1803 $this->form->getItemByPostVar(
'loginname_change_blocking_time')
1804 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
1807 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1811 $security->setPasswordCharsAndNumbersEnabled((
bool)
$_POST[
"password_chars_and_numbers_enabled"]);
1812 $security->setPasswordSpecialCharsEnabled((
bool) $_POST[
"password_special_chars_enabled"]);
1813 $security->setPasswordMinLength((
int) $_POST[
"password_min_length"]);
1814 $security->setPasswordMaxLength((
int) $_POST[
"password_max_length"]);
1815 $security->setPasswordNumberOfUppercaseChars((
int) $_POST[
'password_ucase_chars_num']);
1816 $security->setPasswordNumberOfLowercaseChars((
int) $_POST[
'password_lowercase_chars_num']);
1817 $security->setPasswordMaxAge((
int) $_POST[
"password_max_age"]);
1818 $security->setLoginMaxAttempts((
int) $_POST[
"login_max_attempts"]);
1819 $security->setPreventionOfSimultaneousLogins((
bool)$_POST[
'ps_prevent_simultaneous_logins']);
1820 $security->setPasswordChangeOnFirstLoginEnabled((
bool) $_POST[
'password_change_on_first_login_enabled']);
1821 $security->setPasswordMustNotContainLoginnameStatus((
int) $_POST[
'password_must_not_contain_loginame']);
1823 if(!$security->validate($this->form))
1832 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
1837 $ilSetting->set(
'allow_change_loginname', (
int)$this->form->getInput(
'allow_change_loginname'));
1838 $ilSetting->set(
'create_history_loginname', (
int)$this->form->getInput(
'create_history_loginname'));
1839 $ilSetting->set(
'reuse_of_loginnames', (
int)$this->form->getInput(
'reuse_of_loginnames'));
1840 $save_blocking_time_in_seconds = (int)($this->form->getInput(
'loginname_change_blocking_time') * 86400);
1841 $ilSetting->set(
'loginname_change_blocking_time', (
int)$save_blocking_time_in_seconds);
1842 $ilSetting->set(
'user_adm_alpha_nav', (
int)$this->form->getInput(
'user_adm_alpha_nav'));
1843 $ilSetting->set(
'user_reactivate_code', (
int)$this->form->getInput(
'user_reactivate_code'));
1845 $ilSetting->set(
'user_delete_own_account', (
int)$this->form->getInput(
'user_own_account'));
1846 $ilSetting->set(
'user_delete_own_account_email', $this->form->getInput(
'user_own_account_email'));
1848 $ilSetting->set(
"passwd_auto_generate", $this->form->getInput(
"passwd_auto_generate"));
1849 $ilSetting->set(
"password_assistance", $this->form->getInput(
"password_assistance"));
1852 $ilSetting->set(
'session_handling_type',
1853 (
int)$this->form->getInput(
'session_handling_type'));
1857 $ilSetting->set(
'session_reminder_enabled',
1858 $this->form->getInput(
'session_reminder_enabled'));
1862 require_once
'Services/Authentication/classes/class.ilSessionControl.php';
1864 $ilSetting->get(
'session_allow_client_maintenance',
1869 include_once
"Services/Authentication/classes/class.ilSessionStatistics.php";
1872 $ilSetting->set(
'session_max_count',
1873 (
int)$this->form->getInput(
'session_max_count'));
1874 $ilSetting->set(
'session_min_idle',
1875 (
int)$this->form->getInput(
'session_min_idle'));
1876 $ilSetting->set(
'session_max_idle',
1877 (
int)$this->form->getInput(
'session_max_idle'));
1878 $ilSetting->set(
'session_max_idle_after_first_request',
1879 (
int)$this->form->getInput(
'session_max_idle_after_first_request'));
1895 $this->form->setValuesByPost();
1896 $this->tpl->setContent($this->form->getHTML());
1909 $this->tabs_gui->setTabActive(
'settings');
1910 $this->tabs_gui->setSubTabActive(
'general_settings');
1912 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1914 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveGeneralSettings'));
1916 $this->form->setTitle($this->lng->txt(
'general_settings'));
1918 $lua =
new ilCheckboxInputGUI($this->lng->txt(
'enable_local_user_administration'),
'lua');
1919 $lua->
setInfo($this->lng->txt(
'enable_local_user_administration_info'));
1921 $this->form->addItem($lua);
1924 $lrua->
setInfo($this->lng->txt(
'restrict_user_access_info'));
1926 $this->form->addItem($lrua);
1929 $alph =
new ilCheckboxInputGUI($this->lng->txt(
'user_adm_enable_alpha_nav'),
'user_adm_alpha_nav');
1932 $this->form->addItem($alph);
1935 $code =
new ilCheckboxInputGUI($this->lng->txt(
"user_account_code_setting"),
"user_reactivate_code");
1936 $code->
setInfo($this->lng->txt(
'user_account_code_setting_info'));
1937 $this->form->addItem($code);
1940 $own =
new ilCheckboxInputGUI($this->lng->txt(
"user_allow_delete_own_account"),
"user_own_account");
1941 $this->form->addItem($own);
1942 $own_email =
new ilEMailInputGUI($this->lng->txt(
"user_delete_own_account_notification_email"),
"user_own_account_email");
1943 $own->addSubItem($own_email);
1955 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"session_reminder"),
"session_reminder_enabled");
1958 $cb->
setInfo($this->lng->txt(
"session_reminder_info").
"<br />".
1959 sprintf($this->lng->txt(
'session_reminder_session_duration'), $time));
1963 $ssettings->addOption($fixed);
1969 require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
1973 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_count'),
'session_max_count');
1975 $sub_ti->setSize(5);
1976 $sub_ti->setInfo($this->lng->txt(
'session_max_count_info'));
1978 $sub_ti->setDisabled(
true);
1979 $ldsh->addSubItem($sub_ti);
1984 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_min_idle'),
'session_min_idle');
1986 $sub_ti->setSize(5);
1987 $sub_ti->setInfo($this->lng->txt(
'session_min_idle_info'));
1989 $sub_ti->setDisabled(
true);
1990 $ldsh->addSubItem($sub_ti);
1995 $sub_ti =
new ilTextInputGUI($this->lng->txt(
'session_max_idle'),
'session_max_idle');
1997 $sub_ti->setSize(5);
1998 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_info'));
2000 $sub_ti->setDisabled(
true);
2001 $ldsh->addSubItem($sub_ti);
2006 $this->lng->txt(
'session_max_idle_after_first_request'),
2007 'session_max_idle_after_first_request' 2010 $sub_ti->setSize(5);
2011 $sub_ti->setInfo($this->lng->txt(
'session_max_idle_after_first_request_info'));
2013 $sub_ti->setDisabled(
true);
2014 $ldsh->addSubItem($sub_ti);
2017 $ssettings->addOption($ldsh);
2024 $this->form->addItem($ssettings);
2031 $ti->
setValue($this->lng->txt(
'session_config_maintenance_disabled'));
2032 $ssettings->setDisabled(
true);
2033 $ti->addSubItem($ssettings);
2034 $this->form->addItem($ti);
2040 $this->lng->loadLanguageModule(
'ps');
2043 $pass->setTitle($this->lng->txt(
'ps_password_settings'));
2044 $this->form->addItem(
$pass);
2047 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"passwd_generation_pre"),
"passwd_auto_generate");
2048 $cb->setChecked($ilSetting->get(
"passwd_auto_generate"));
2049 $cb->
setInfo($this->lng->txt(
"passwd_generation_info"));
2050 $this->form->addItem($cb);
2052 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_change_on_first_login_enabled'),
'password_change_on_first_login_enabled');
2053 $check->
setInfo($this->lng->txt(
'ps_password_change_on_first_login_enabled_info'));
2054 $this->form->addItem($check);
2056 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2058 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_must_not_contain_loginame'),
'password_must_not_contain_loginame');
2059 $check->
setInfo($this->lng->txt(
'ps_password_must_not_contain_loginame_info'));
2060 $this->form->addItem($check);
2062 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_chars_and_numbers_enabled'),
'password_chars_and_numbers_enabled');
2064 $check->
setInfo($this->lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
2065 $this->form->addItem($check);
2067 $check =
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_special_chars_enabled'),
'password_special_chars_enabled');
2069 $check->
setInfo($this->lng->txt(
'ps_password_special_chars_enabled_info'));
2070 $this->form->addItem($check);
2072 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_min_length'),
'password_min_length');
2073 $text->
setInfo($this->lng->txt(
'ps_password_min_length_info'));
2075 $text->setMaxLength(2);
2076 $this->form->addItem($text);
2078 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_max_length'),
'password_max_length');
2079 $text->
setInfo($this->lng->txt(
'ps_password_max_length_info'));
2081 $text->setMaxLength(3);
2082 $this->form->addItem($text);
2084 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_uppercase_chars_num'),
'password_ucase_chars_num');
2085 $text->
setInfo($this->lng->txt(
'ps_password_uppercase_chars_num_info'));
2086 $text->setMinValue(0);
2088 $text->setMaxLength(3);
2089 $this->form->addItem($text);
2091 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_lowercase_chars_num'),
'password_lowercase_chars_num');
2092 $text->
setInfo($this->lng->txt(
'ps_password_lowercase_chars_num_info'));
2093 $text->setMinValue(0);
2095 $text->setMaxLength(3);
2096 $this->form->addItem($text);
2098 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_password_max_age'),
'password_max_age');
2099 $text->
setInfo($this->lng->txt(
'ps_password_max_age_info'));
2101 $text->setMaxLength(3);
2102 $this->form->addItem($text);
2105 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"enable_password_assistance"),
"password_assistance");
2106 $cb->
setInfo($this->lng->txt(
"password_assistance_info"));
2107 $this->form->addItem($cb);
2110 $pass->setTitle($this->lng->txt(
'ps_security_protection'));
2111 $this->form->addItem(
$pass);
2113 $text =
new ilNumberInputGUI($this->lng->txt(
'ps_login_max_attempts'),
'login_max_attempts');
2114 $text->
setInfo($this->lng->txt(
'ps_login_max_attempts_info'));
2116 $text->setMaxLength(2);
2117 $this->form->addItem($text);
2120 $objCb =
new ilCheckboxInputGUI($this->lng->txt(
'ps_prevent_simultaneous_logins'),
'ps_prevent_simultaneous_logins');
2122 $objCb->setInfo($this->lng->txt(
'ps_prevent_simultaneous_logins_info'));
2123 $this->form->addItem($objCb);
2129 $log->setTitle($this->lng->txt(
'loginname_settings'));
2130 $this->form->addItem(
$log);
2132 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
2134 $this->form->addItem($chbChangeLogin);
2135 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
2136 $chbCreateHistory->
setInfo($this->lng->txt(
'loginname_history_info'));
2137 $chbCreateHistory->setValue(1);
2139 $chbChangeLogin->addSubItem($chbCreateHistory);
2140 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
2142 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2144 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2145 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
2147 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
2148 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
2149 $chbChangeBlockingTime->setSize(10);
2150 $chbChangeBlockingTime->setMaxLength(10);
2151 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2153 $this->form->addCommandButton(
'saveGeneralSettings', $this->lng->txt(
'save'));
2173 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
2174 $lng->loadLanguageModule(
"administration");
2175 $lng->loadLanguageModule(
"mail");
2177 $ilTabs->activateTab(
'settings');
2178 $ilTabs->activateSubTab(
'standard_fields');
2180 include_once(
"./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
2182 if($this->confirm_change)
$tab->setConfirmChange();
2183 $tpl->setContent(
$tab->getHTML());
2193 include_once
'Services/Search/classes/class.ilUserSearchOptions.php';
2194 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2199 include_once(
"./Services/User/classes/class.ilUserProfile.php");
2201 $up->skipField(
"username");
2202 $field_properties = $up->getStandardFields();
2203 $profile_fields = array_keys($field_properties);
2206 foreach ($profile_fields as $field)
2208 if (
$_POST[
"chb"][
"required_".$field] &&
2209 !(
int)
$_POST[
'chb'][
'visib_reg_' . $field]
2220 $this->confirm_change = 1;
2226 $fixed_required_fields = array(
2233 "hits_per_page" => 0,
2234 "show_users_online" => 0,
2235 "hide_own_online_status" => 0
2240 if ($privacy->enabledCourseExport() ==
true &&
2241 $privacy->courseConfirmationRequired() ==
true &&
2244 foreach ($profile_fields as $field)
2246 if (! $ilias->getSetting(
"usr_settings_course_export_" . $field) &&
$_POST[
"chb"][
"course_export_" . $field] ==
"1")
2248 #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export')); 2249 #$this->confirm_change = 1; 2250 #$this->settingsObject(); 2256 if($action ==
'save')
2258 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2262 foreach ($profile_fields as $field)
2270 if (!
$_POST[
"chb"][
"visible_".$field] && !$field_properties[$field][
"visible_hide"])
2272 $ilias->setSetting(
"usr_settings_hide_".$field,
"1");
2276 $ilias->deleteSetting(
"usr_settings_hide_".$field);
2279 if (!
$_POST[
"chb"][
"changeable_" . $field] && !$field_properties[$field][
"changeable_hide"])
2281 $ilias->setSetting(
"usr_settings_disable_".$field,
"1");
2285 $ilias->deleteSetting(
"usr_settings_disable_".$field);
2289 if ((
int)
$_POST[
'chb'][
'visib_reg_' . $field] && !$field_properties[$field][
"visib_reg_hide"])
2291 $ilSetting->set(
'usr_settings_visib_reg_'.$field,
'1');
2295 $ilSetting->set(
'usr_settings_visib_reg_'.$field,
'0');
2298 if ((
int)
$_POST[
'chb'][
'visib_lua_' . $field])
2301 $ilSetting->set(
'usr_settings_visib_lua_'.$field,
'1');
2305 $ilSetting->set(
'usr_settings_visib_lua_'.$field,
'0');
2308 if ((
int)
$_POST[
'chb'][
'changeable_lua_' . $field])
2311 $ilSetting->set(
'usr_settings_changeable_lua_'.$field,
'1');
2315 $ilSetting->set(
'usr_settings_changeable_lua_'.$field,
'0');
2318 if (
$_POST[
"chb"][
"export_" . $field] && !$field_properties[$field][
"export_hide"])
2320 $ilias->setSetting(
"usr_settings_export_".$field,
"1");
2324 $ilias->deleteSetting(
"usr_settings_export_".$field);
2328 if (
$_POST[
"chb"][
"course_export_" . $field] && !$field_properties[$field][
"course_export_hide"])
2330 $ilias->setSetting(
"usr_settings_course_export_".$field,
"1");
2334 $ilias->deleteSetting(
"usr_settings_course_export_".$field);
2338 if (
$_POST[
"chb"][
"group_export_" . $field] && !$field_properties[$field][
"group_export_hide"])
2340 $ilias->setSetting(
"usr_settings_group_export_".$field,
"1");
2344 $ilias->deleteSetting(
"usr_settings_group_export_".$field);
2347 $is_fixed = array_key_exists($field, $fixed_required_fields);
2348 if ($is_fixed && $fixed_required_fields[$field] || ! $is_fixed &&
$_POST[
"chb"][
"required_".$field])
2350 $ilias->setSetting(
"require_".$field,
"1");
2354 $ilias->deleteSetting(
"require_" . $field);
2358 if (
$_POST[
"select"][
"default_hits_per_page"])
2360 $ilias->setSetting(
"hits_per_page",
$_POST[
"select"][
"default_hits_per_page"]);
2363 if (
$_POST[
"select"][
"default_show_users_online"])
2365 $ilias->setSetting(
"show_users_online",
$_POST[
"select"][
"default_show_users_online"]);
2368 if (
$_POST[
"chb"][
"export_preferences"])
2370 $ilias->setSetting(
"usr_settings_export_preferences",
$_POST[
"chb"][
"export_preferences"]);
2372 $ilias->deleteSetting(
"usr_settings_export_preferences");
2375 $ilias->setSetting(
'mail_incoming_mail', (
int)
$_POST[
'select'][
'default_mail_incoming_mail']);
2387 $action[-1] = $this->lng->txt(
'all_users');
2388 $action[1] = $this->lng->txt(
'usr_active_only');
2389 $action[0] = $this->lng->txt(
'usr_inactive_only');
2390 $action[2] = $this->lng->txt(
'usr_limited_access_only');
2391 $action[3] = $this->lng->txt(
'usr_without_courses');
2392 $action[4] = $this->lng->txt(
'usr_filter_lastlogin');
2393 $action[5] = $this->lng->txt(
"usr_filter_coursemember");
2394 $action[6] = $this->lng->txt(
"usr_filter_groupmember");
2395 $action[7] = $this->lng->txt(
"usr_filter_role");
2408 if(!isset(
$_POST[
"file"]))
2410 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
2413 if (count(
$_POST[
"file"]) > 1)
2415 $this->
ilias->raiseError($this->lng->txt(
"select_max_one_item"),$this->
ilias->error_obj->MESSAGE);
2420 $export_dir = $this->
object->getExportDirectory();
2429 if(!isset(
$_POST[
"file"]))
2431 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
2435 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2437 $cgui->setFormAction($this->ctrl->getFormAction($this));
2438 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
2439 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteExportFile");
2440 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteExportFile");
2448 $this->tpl->setContent($cgui->getHTML());
2457 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2466 $export_dir = $this->
object->getExportDirectory();
2469 $file = basename($file);
2471 $exp_file = $export_dir.
"/".
$file;
2472 if (@is_file($exp_file))
2477 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2494 if (
$_POST[
"cmd"][
"export"])
2496 $this->
object->buildExportFile(
$_POST[
"export_type"]);
2497 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
2501 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_export.html',
'Services/User');
2503 $export_types = array(
2504 "userfolder_export_excel_x86",
2505 "userfolder_export_csv",
2506 "userfolder_export_xml" 2510 include_once(
"./Services/Table/classes/class.ilTableGUI.php");
2514 $this->tpl->addBlockfile(
"EXPORT_FILES",
"export_files",
"tpl.table.html");
2517 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.usr_export_file_row.html",
"Services/User");
2521 $tbl->setTitle($this->lng->txt(
"userfolder_export_files"));
2523 $tbl->setHeaderNames(array(
"", $this->lng->txt(
"userfolder_export_file"),
2524 $this->lng->txt(
"userfolder_export_file_size"), $this->lng->txt(
"date") ));
2525 $tbl->setHeaderVars(array(), $ilCtrl->getParameterArray($this,
"export"));
2527 $tbl->enabled[
"sort"] =
false;
2528 $tbl->setColumnWidth(array(
"1%",
"49%",
"25%",
"25%"));
2531 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
2532 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
2533 $tbl->setLimit(
$_GET[
"limit"]);
2534 $tbl->setOffset(
$_GET[
"offset"]);
2535 $tbl->setMaxCount($this->maxcount);
2538 $this->tpl->setVariable(
"COLUMN_COUNTS", 4);
2542 $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
2543 $this->tpl->setCurrentBlock(
"tbl_action_btn");
2544 $this->tpl->setVariable(
"BTN_NAME",
"confirmDeleteExportFile");
2545 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
2546 $this->tpl->parseCurrentBlock();
2548 $this->tpl->setCurrentBlock(
"tbl_action_btn");
2549 $this->tpl->setVariable(
"BTN_NAME",
"downloadExportFile");
2550 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
2551 $this->tpl->parseCurrentBlock();
2554 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
2557 $export_files = $this->
object->getExportFiles();
2559 $tbl->setMaxCount(count($export_files));
2560 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
2564 if(count($export_files) > 0)
2567 foreach($export_files as $exp_file)
2569 $this->tpl->setCurrentBlock(
"tbl_content");
2570 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"filename"]);
2573 $this->tpl->setVariable(
"CSS_ROW", $css_row);
2575 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"filesize"]);
2576 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"filename"]);
2578 $file_arr = explode(
"__", $exp_file[
"filename"]);
2581 $this->tpl->parseCurrentBlock();
2584 $this->tpl->setCurrentBlock(
"selectall");
2585 $this->tpl->setVariable(
"SELECT_ALL", $this->lng->txt(
"select_all"));
2586 $this->tpl->setVariable(
"CSS_ROW", $css_row);
2587 $this->tpl->parseCurrentBlock();
2600 $this->tpl->parseCurrentBlock();
2603 foreach ($export_types as $export_type)
2605 $this->tpl->setCurrentBlock(
"option");
2606 $this->tpl->setVariable(
"OPTION_VALUE", $export_type);
2607 $this->tpl->setVariable(
"OPTION_TEXT", $this->lng->txt($export_type));
2608 $this->tpl->parseCurrentBlock();
2611 $this->tpl->setVariable(
"EXPORT_BUTTON", $this->lng->txt(
"create_export_file"));
2612 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
2619 $lng->loadLanguageModule(
"meta");
2620 $lng->loadLanguageModule(
"mail");
2622 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2624 $form->setFormAction($ilCtrl->getFormAction($this));
2627 $form->setTitle($lng->txt(
"user_new_account_mail"));
2628 $form->setDescription($lng->txt(
"user_new_account_mail_desc"));
2630 $langs = $lng->getInstalledLanguages();
2631 foreach($langs as $lang_key)
2633 $amail = $this->
object->_lookupNewAccountMail($lang_key);
2635 $title = $lng->txt(
"meta_l_".$lang_key);
2636 if ($lang_key == $lng->getDefaultLanguage())
2638 $title .=
" (".$lng->txt(
"default").
")";
2642 $header->setTitle($title);
2643 $form->addItem($header);
2645 $subj =
new ilTextInputGUI($lng->txt(
"subject"),
"subject_".$lang_key);
2647 $subj->
setValue($amail[
"subject"]);
2648 $form->addItem($subj);
2650 $salg =
new ilTextInputGUI($lng->txt(
"mail_salutation_general"),
"sal_g_".$lang_key);
2653 $form->addItem($salg);
2655 $salf =
new ilTextInputGUI($lng->txt(
"mail_salutation_female"),
"sal_f_".$lang_key);
2658 $form->addItem($salf);
2660 $salm =
new ilTextInputGUI($lng->txt(
"mail_salutation_male"),
"sal_m_".$lang_key);
2663 $form->addItem($salm);
2669 $body->setCols(100);
2670 $form->addItem($body);
2672 $att =
new ilFileInputGUI($lng->txt(
"attachment"),
"att_".$lang_key);
2673 $att->setAllowDeletion(
true);
2674 if($amail[
"att_file"])
2676 $att->
setValue($amail[
"att_file"]);
2678 $form->addItem($att);
2681 $form->addCommandButton(
"saveNewAccountMail", $lng->txt(
"save"));
2682 $form->addCommandButton(
"cancelNewAccountMail", $lng->txt(
"cancel"));
2695 $this->tabs_gui->setTabActive(
'settings');
2696 $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
2700 $ftpl =
new ilTemplate(
'tpl.usrf_new_account_mail.html',
true,
true,
'Services/User');
2701 $ftpl->setVariable(
"FORM", $form->getHTML());
2705 $ftpl->setVariable(
"TXT_USE_PLACEHOLDERS", $lng->txt(
"mail_nacc_use_placeholder"));
2706 $ftpl->setVariable(
"TXT_MAIL_SALUTATION", $lng->txt(
"mail_nacc_salutation"));
2707 $ftpl->setVariable(
"TXT_FIRST_NAME", $lng->txt(
"firstname"));
2708 $ftpl->setVariable(
"TXT_LAST_NAME", $lng->txt(
"lastname"));
2709 $ftpl->setVariable(
"TXT_EMAIL", $lng->txt(
"email"));
2710 $ftpl->setVariable(
"TXT_LOGIN", $lng->txt(
"mail_nacc_login"));
2711 $ftpl->setVariable(
"TXT_PASSWORD", $lng->txt(
"password"));
2712 $ftpl->setVariable(
"TXT_PASSWORD_BLOCK", $lng->txt(
"mail_nacc_pw_block"));
2713 $ftpl->setVariable(
"TXT_NOPASSWORD_BLOCK", $lng->txt(
"mail_nacc_no_pw_block"));
2714 $ftpl->setVariable(
"TXT_ADMIN_MAIL", $lng->txt(
"mail_nacc_admin_mail"));
2715 $ftpl->setVariable(
"TXT_ILIAS_URL", $lng->txt(
"mail_nacc_ilias_url"));
2716 $ftpl->setVariable(
"TXT_CLIENT_NAME", $lng->txt(
"mail_nacc_client_name"));
2717 $ftpl->setVariable(
"TXT_TARGET", $lng->txt(
"mail_nacc_target"));
2718 $ftpl->setVariable(
"TXT_TARGET_TITLE", $lng->txt(
"mail_nacc_target_title"));
2719 $ftpl->setVariable(
"TXT_TARGET_TYPE", $lng->txt(
"mail_nacc_target_type"));
2720 $ftpl->setVariable(
"TXT_TARGET_BLOCK", $lng->txt(
"mail_nacc_target_block"));
2721 $ftpl->setVariable(
"TXT_IF_TIMELIMIT", $lng->txt(
"mail_nacc_if_timelimit"));
2722 $ftpl->setVariable(
"TXT_TIMELIMIT", $lng->txt(
"mail_nacc_timelimit"));
2724 $this->tpl->setContent($ftpl->get());
2729 $this->ctrl->redirect($this,
"settings");
2736 $langs = $lng->getInstalledLanguages();
2737 foreach($langs as $lang_key)
2739 $this->
object->_writeNewAccountMail($lang_key,
2746 if($_FILES[
"att_".$lang_key][
"tmp_name"])
2748 $this->
object->_updateAccountMailAttachment($lang_key,
2749 $_FILES[
"att_".$lang_key][
"tmp_name"],
2750 $_FILES[
"att_".$lang_key][
"name"]);
2753 if (
$_POST[
"att_".$lang_key.
"_delete"])
2755 $this->
object->_deleteAccountMailAttachment($lang_key);
2760 $this->ctrl->redirect($this,
"newAccountMail");
2775 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
2779 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
2781 $tabs_gui->addTarget(
"usrf",
2782 $this->ctrl->getLinkTarget($this,
"view"), array(
"view",
"delete",
"resetFilter",
"userAction",
""),
"",
"");
2784 $tabs_gui->addTarget(
2785 "search_user_extended",
2786 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''),
2788 "ilrepositorysearchgui",
2793 if ($rbacsystem->checkAccess(
"write",$this->object->getRefId()))
2795 $tabs_gui->addTarget(
"settings",
2796 $this->ctrl->getLinkTarget($this,
"generalSettings"),array(
'settings',
'generalSettings',
'listUserDefinedField',
'newAccountMail'));
2798 $tabs_gui->addTarget(
"export",
2799 $this->ctrl->getLinkTarget($this,
"export"),
"export",
"",
"");
2811 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
2813 $tabs_gui->addTarget(
"perm_settings",
2814 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2815 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
2830 $this->tabs_gui->addSubTabTarget(
2832 $this->ctrl->getLinkTarget($this,
'generalSettings'),
'generalSettings', get_class($this));
2833 $this->tabs_gui->addSubTabTarget(
"standard_fields",
2834 $this->ctrl->getLinkTarget($this,
'settings'),
2835 array(
"settings",
"saveGlobalUserSettings"), get_class($this));
2836 $this->tabs_gui->addSubTabTarget(
"user_defined_fields",
2837 $this->ctrl->getLinkTargetByClass(
"ilcustomuserfieldsgui",
"listUserDefinedFields"),
2838 "listUserDefinedFields",get_class($this));
2839 $this->tabs_gui->addSubTabTarget(
"user_new_account_mail",
2840 $this->ctrl->getLinkTarget($this,
'newAccountMail'),
2841 "newAccountMail",get_class($this));
2842 #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"), 2843 # $this->ctrl->getLinkTargetByClass("ilaccountcodesgui")); 2852 $show_blocking_time_in_days = (int)$ilSetting->get(
'loginname_change_blocking_time') / 86400;
2855 $this->loginSettingsForm->setValuesByArray(array(
2856 'allow_change_loginname' => (
bool)$ilSetting->get(
'allow_change_loginname'),
2857 'create_history_loginname' => (bool)$ilSetting->get(
'create_history_loginname'),
2858 'reuse_of_loginnames' => (bool)$ilSetting->get(
'reuse_of_loginnames'),
2859 'loginname_change_blocking_time' => (float)$show_blocking_time_in_days
2862 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2868 $this->tabs_gui->setTabActive(
'settings');
2869 $this->tabs_gui->setSubTabActive(
'loginname_settings');
2871 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2873 $this->loginSettingsForm->
setFormAction($this->ctrl->getFormAction($this,
'saveLoginnameSettings'));
2874 $this->loginSettingsForm->setTitle($this->lng->txt(
'loginname_settings'));
2876 $chbChangeLogin =
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'),
'allow_change_loginname');
2878 $this->loginSettingsForm->addItem($chbChangeLogin);
2879 $chbCreateHistory =
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'),
'create_history_loginname');
2880 $chbCreateHistory->
setInfo($this->lng->txt(
'loginname_history_info'));
2881 $chbCreateHistory->setValue(1);
2882 $chbChangeLogin->addSubItem($chbCreateHistory);
2883 $chbReuseLoginnames =
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
'reuse_of_loginnames');
2885 $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
2886 $chbChangeLogin->addSubItem($chbReuseLoginnames);
2887 $chbChangeBlockingTime =
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'),
'loginname_change_blocking_time');
2889 $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
2890 $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
2891 $chbChangeBlockingTime->setSize(10);
2892 $chbChangeBlockingTime->setMaxLength(10);
2893 $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2895 $this->loginSettingsForm->addCommandButton(
'saveLoginnameSettings', $this->lng->txt(
'save'));
2903 if($this->loginSettingsForm->checkInput())
2907 if(!strlen($this->loginSettingsForm->getInput(
'loginname_change_blocking_time')))
2910 $this->loginSettingsForm->getItemByPostVar(
'loginname_change_blocking_time')
2911 ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
2916 $save_blocking_time_in_seconds = (int)$this->loginSettingsForm->getInput(
'loginname_change_blocking_time') * 86400;
2918 $ilSetting->set(
'allow_change_loginname', (
int)$this->loginSettingsForm->getInput(
'allow_change_loginname'));
2919 $ilSetting->set(
'create_history_loginname', (
int)$this->loginSettingsForm->getInput(
'create_history_loginname'));
2920 $ilSetting->set(
'reuse_of_loginnames', (
int)$this->loginSettingsForm->getInput(
'reuse_of_loginnames'));
2921 $ilSetting->set(
'loginname_change_blocking_time', (
int)$save_blocking_time_in_seconds);
2934 $this->loginSettingsForm->setValuesByPost();
2936 $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
2948 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2950 ilUtil::redirect(
"ilias.php?baseClass=ilAdministrationGUI&ref_id=".$a_target.
"&jmpToUser=".$a_user);
2955 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2962 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2974 $ilCtrl->setParameterByClass(
"ilobjusergui",
"obj_id", (
int) $_GET[
"jmpToUser"]);
2975 $ilCtrl->redirectByClass(
"ilobjusergui",
"view");
2984 if(!count((array) $a_usr_ids))
2990 $_POST[
'id'] = $a_usr_ids;
2993 if(stristr($a_cmd,
"export"))
2995 $cmd = $a_cmd.
"Object";
2996 return $this->
$cmd();
2999 $_POST[
'selectedAction'] = $a_cmd;
3011 'activate' => $this->lng->txt(
'activate'),
3012 'deactivate' => $this->lng->txt(
'deactivate'),
3013 'accessRestrict' => $this->lng->txt(
'accessRestrict'),
3014 'accessFree' => $this->lng->txt(
'accessFree')
3017 if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId()))
3019 $cmds[
"delete"] = $this->lng->txt(
"delete");
3026 'activateUsers' => $this->lng->txt(
'activate'),
3027 'deactivateUsers' => $this->lng->txt(
'deactivate'),
3028 'restrictAccess' => $this->lng->txt(
'accessRestrict'),
3029 'freeAccess' => $this->lng->txt(
'accessFree')
3032 if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId()))
3034 $cmds[
"deleteUsers"] = $this->lng->txt(
"delete");
3039 $export_types = array(
"userfolder_export_excel_x86",
"userfolder_export_csv",
"userfolder_export_xml");
3040 foreach ($export_types as $type)
3042 $cmd = explode(
"_", $type);
3044 $cmds[
'usrExport'.ucfirst(
$cmd)] = $this->lng->txt(
'export').
' - '.
3045 $this->lng->txt($type);
3049 include_once
"Services/Mail/classes/class.ilMail.php";
3050 $mail =
new ilMail($ilUser->getId());
3051 if($rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId()))
3053 $cmds[
"mail"] = $this->lng->txt(
"send_mail");
3067 $this->
object->buildExportFile(
"userfolder_export_excel_x86", $user_ids);
3068 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
3079 $this->
object->buildExportFile(
"userfolder_export_csv", $user_ids);
3080 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
3091 $this->
object->buildExportFile(
"userfolder_export_xml", $user_ids);
3092 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"export");
3107 include_once
"Services/Contact/classes/class.ilMailingLists.php";
3109 $list->deleteTemporaryLists();
3112 include_once
"Services/Contact/classes/class.ilMailingList.php";
3115 $list->setTitle(
"-TEMPORARY SYSTEM LIST-");
3116 $list->setDescription(
"-USER ACCOUNTS MAIL-");
3117 $list->setCreateDate(date(
"Y-m-d H:i:s"));
3119 $list_id = $list->getId();
3122 foreach($user_ids as $user_id)
3124 $list->assignAddressbookEntry($user_id);
3127 include_once
"Services/Mail/classes/class.ilFormatMail.php";
3131 if(!is_array($mail_data))
3133 $mail_data = array(
"user_id" => $ilUser->getId());
3140 $mail_data[
'user_id'],
3141 $mail_data[
'attachments'],
3143 $mail_data[
'rcp_cc'],
3144 $mail_data[
'rcp_bcc'],
3145 $mail_data[
'm_type'],
3146 $mail_data[
'm_email'],
3147 $mail_data[
'm_subject'],
3148 $mail_data[
'm_message'],
3149 $mail_data[
'use_placeholders']
3161 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
3171 'ps_password_min_length' => (
int)$security->getPasswordMinLength(),
3172 'ps_password_max_length' => (int)$security->getPasswordMaxLength(),
3173 'ps_password_uppercase_chars_num' => (int)$security->getPasswordNumberOfUppercaseChars(),
3174 'ps_password_lowercase_chars_num' => (int)$security->getPasswordNumberOfLowercaseChars(),
3175 'ps_password_max_age' => (int)$security->getPasswordMaxAge()
3177 $fields[
'ps_password_settings'] = array(null, null, $subitems);
3180 'ps_login_max_attempts' => (
int)$security->getLoginMaxAttempts(),
3183 $fields[
'ps_security_protection'] = array(null, null, $subitems);
3185 return array(array(
"generalSettings", $fields));
showLoginnameSettingsObject()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _isSearchable($a_key)
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.
__setTableGUIBasicData(&$tbl, &$result_set, $from="")
getSavedData()
get saved data public
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.
setValue($a_value)
Set Value.
activateUsersObject()
Activate users.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
initFormGeneralSettings()
init general settings form
updateAppliedUsersObject()
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.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
static _lookupTitle($a_id)
lookup object title
viewObject()
list childs of current object
exportObject()
Global user settings.
const SESSION_HANDLING_FIXED
setInfo($a_info)
Set Info.
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static _reset()
Reset all.
importCancelledObject()
import cancelled
importUserFormObject()
display form for user import
generalSettingsObject()
Show user account general settings.
confirmaccessRestrictObject()
Auto completion class for user lists.
restrictAccessObject()
Restrict access.
_lookupNewAccountMail($a_lang)
getTabs(&$tabs_gui)
get tabs public
getActionUserIds()
Get selected items for table action.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
viewObject($reset_filter=FALSE)
list users
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.
deleteUsersObject()
Delete users.
static _enabledLearningProgress()
check wether learing progress is enabled or not
Class ilCustomUserFieldsGUI.
deactivateUsersObject()
Deactivate users.
static _saveStatus($a_key, $a_enabled)
saveGeneralSettingsObject()
Save user account settings.
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
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.
Class Mail this class handles base functions for mail handling.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
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
ilObjUserFolderGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor public.
This class represents a text property in a property form.
__getDateSelect($a_type, $a_varname, $a_selected)
static formatDate(ilDateTime $date)
Format a date public.
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.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
confirmdeactivateObject()
Set the selected users inactive.
jumpToUserObject()
Jump to edit screen for user.
prepareOutput()
prepare output
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)
This class represents a non editable value in a property form.
_getAssignUsersStatus($a_role_id)
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.
const SESSION_HANDLING_LOAD_DEPENDENT
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
static _getInstance()
Get instance of ilPrivacySettings.
const DEFAULT_ALLOW_CLIENT_MAINTENANCE
cancelUserFolderActionObject()
setValue($a_value)
Set Value.
static redirect($a_script)
http redirect to other 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()
const DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST
const IL_UPDATE_ON_CONFLICT
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
const IL_IGNORE_ON_CONFLICT
__showAppliedUsersTable($a_result_set)
setAccessRestrictionObject($a_form=null, $a_from_search=false)
Confirmation screen class.
addUserAutoCompleteObject()
Show auto complete results.
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)
save post data in table public