ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjUserFolderGUI Class Reference

Class ilObjUserFolderGUI. More...

+ Inheritance diagram for ilObjUserFolderGUI:
+ Collaboration diagram for ilObjUserFolderGUI:

Public Member Functions

 ilObjUserFolderGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public. More...
 
 setUserOwnerId ($a_id)
 
 getUserOwnerId ()
 
executeCommand ()
 
 learningProgressObject ()
 
 resetFilterObject ()
 Reset filter (note: this function existed before data table filter has been introduced. More...
 
 addUserObject ()
 Add new user;. More...
 
 applyFilterObject ()
 Apply filter. More...
 
 viewObject ($reset_filter=FALSE)
 list users More...
 
 chooseLetterObject ()
 Choose first letter. More...
 
 showActions ($with_subobjects=false)
 show possible action (form buttons) More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders More...
 
 cancelUserFolderActionObject ()
 
 cancelSearchActionObject ()
 
 confirmactivateObject ()
 Set the selected users active. More...
 
 confirmdeactivateObject ()
 Set the selected users inactive. More...
 
 confirmaccessFreeObject ()
 
 setAccessRestrictionObject ($a_form=null, $a_from_search=false)
 
 confirmaccessRestrictObject ()
 
 confirmdeleteObject ()
 confirm delete Object More...
 
 showActionConfirmation ($action, $a_from_search=false)
 display activation confirmation screen More...
 
 deleteUsersObject ()
 Delete users. More...
 
 activateUsersObject ()
 Activate users. More...
 
 deactivateUsersObject ()
 Deactivate users. More...
 
 restrictAccessObject ()
 Restrict access. More...
 
 freeAccessObject ()
 Free access. More...
 
 userActionObject ()
 
 importUserFormObject ()
 display form for user import More...
 
 initUserImportForm ()
 Init user import form. More...
 
 importCancelledObject ()
 import cancelled More...
 
 getImportDir ()
 get user import directory name More...
 
 importUserRoleAssignmentObject ()
 display form for user import More...
 
 importUsersObject ()
 import users More...
 
 appliedUsersObject ()
 
 editAppliedUsersObject ()
 
 updateAppliedUsersObject ()
 
 __showAppliedUsersTable ($a_result_set)
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $from="")
 
 __getDateSelect ($a_type, $a_varname, $a_selected)
 
 __toUnix ($a_time_arr)
 
 hitsperpageObject ()
 
 saveGeneralSettingsObject ()
 Save user account settings. More...
 
 settingsObject ()
 Global user settings. More...
 
 confirmSavedObject ()
 
 saveGlobalUserSettingsObject ($action="")
 
 __buildUserFilterSelect ()
 build select form to distinguish between active and non-active users More...
 
 downloadExportFileObject ()
 Download selected export files. More...
 
 confirmDeleteExportFileObject ()
 confirmation screen for export file deletion More...
 
 cancelDeleteExportFileObject ()
 cancel deletion of export files More...
 
 deleteExportFileObject ()
 delete export files More...
 
 exportObject ()
 Global user settings. More...
 
 newAccountMailObject ()
 new account mail administration More...
 
 cancelNewAccountMailObject ()
 
 saveNewAccountMailObject ()
 
 getAdminTabs (&$tabs_gui)
 
 getTabs (&$tabs_gui)
 get tabs public More...
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 showLoginnameSettingsObject ()
 
 saveLoginnameSettingsObject ()
 
 jumpToUserObject ()
 Jump to edit screen for user. More...
 
 searchResultHandler ($a_usr_ids, $a_cmd)
 Handles multi command from repository search gui. More...
 
 getUserMultiCommands ($a_search_form=false)
 
 usrExportX86Object ()
 
 usrExportCsvObject ()
 
 usrExportXmlObject ()
 
 mailObject ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_user)
 goto target group More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $ctrl
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 addUserAutoCompleteObject ()
 Show auto complete results. More...
 
 initAccessRestrictionForm ($a_from_search=false)
 
 getActionUserIds ()
 Get selected items for table action. More...
 
 generalSettingsObject ()
 Show user account general settings. More...
 
 initFormGeneralSettings ()
 init general settings form More...
 
 initNewAccountMailForm ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Member Functions

 initLoginSettingsForm ()
 

Detailed Description

Member Function Documentation

◆ __buildUserFilterSelect()

ilObjUserFolderGUI::__buildUserFilterSelect ( )

build select form to distinguish between active and non-active users

Definition at line 2385 of file class.ilObjUserFolderGUI.php.

References $_SESSION, and ilUtil\formSelect().

2386  {
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");
2396 
2397  return ilUtil::formSelect($_SESSION['user_filter'],"user_filter",$action,false,true);
2398  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
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.
+ Here is the call graph for this function:

◆ __getDateSelect()

ilObjUserFolderGUI::__getDateSelect (   $a_type,
  $a_varname,
  $a_selected 
)

Definition at line 1670 of file class.ilObjUserFolderGUI.php.

References ilUtil\formSelect().

Referenced by editAppliedUsersObject().

1671  {
1672  switch($a_type)
1673  {
1674  case "minute":
1675  for($i=0;$i<=60;$i++)
1676  {
1677  $days[$i] = $i < 10 ? "0".$i : $i;
1678  }
1679  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1680 
1681  case "hour":
1682  for($i=0;$i<24;$i++)
1683  {
1684  $days[$i] = $i < 10 ? "0".$i : $i;
1685  }
1686  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1687 
1688  case "day":
1689  for($i=1;$i<32;$i++)
1690  {
1691  $days[$i] = $i < 10 ? "0".$i : $i;
1692  }
1693  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1694 
1695  case "month":
1696  for($i=1;$i<13;$i++)
1697  {
1698  $month[$i] = $i < 10 ? "0".$i : $i;
1699  }
1700  return ilUtil::formSelect($a_selected,$a_varname,$month,false,true);
1701 
1702  case "year":
1703  for($i = date("Y",time());$i < date("Y",time()) + 3;++$i)
1704  {
1705  $year[$i] = $i;
1706  }
1707  return ilUtil::formSelect($a_selected,$a_varname,$year,false,true);
1708  }
1709  }
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __initTableGUI()

& ilObjUserFolderGUI::__initTableGUI ( )

Definition at line 1647 of file class.ilObjUserFolderGUI.php.

Referenced by __showAppliedUsersTable().

1648  {
1649  include_once "./Services/Table/classes/class.ilTableGUI.php";
1650 
1651  return new ilTableGUI(0,false);
1652  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

ilObjUserFolderGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $from = "" 
)

Definition at line 1654 of file class.ilObjUserFolderGUI.php.

References $_GET.

Referenced by __showAppliedUsersTable().

1655  {
1656  $offset = $_GET["offset"];
1657  $order = $_GET["sort_by"];
1658  $direction = $_GET["sort_order"];
1659 
1660  //$tbl->enable("hits");
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);
1668  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ __showAppliedUsersTable()

ilObjUserFolderGUI::__showAppliedUsersTable (   $a_result_set)

Definition at line 1599 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil\getImagePath().

Referenced by appliedUsersObject().

1600  {
1601  $tbl =& $this->__initTableGUI();
1602  $tpl =& $tbl->getTemplateObject();
1603 
1604  // SET FORMAACTION
1605  $tpl->setCurrentBlock("tbl_form_header");
1606 
1607  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1608  $tpl->parseCurrentBlock();
1609 
1610  $tpl->setCurrentBlock("tbl_action_btn");
1611  $tpl->setVariable("BTN_NAME",'editAppliedUsers');
1612  $tpl->setVariable("BTN_VALUE",$this->lng->txt('edit'));
1613  $tpl->parseCurrentBlock();
1614 
1615  $tpl->setCurrentBlock("tbl_action_row");
1616  $tpl->setVariable("COLUMN_COUNTS",5);
1617  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1618  $tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
1619  $tpl->parseCurrentBlock();
1620 
1621 
1622 
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("",
1631  "login",
1632  "firstname",
1633  "lastname",
1634  "time_limit"),
1635  array($header_params));
1636  $tbl->setColumnWidth(array("3%","19%","19%","19%","40%"));
1637 
1638 
1639  $this->__setTableGUIBasicData($tbl,$a_result_set);
1640  $tbl->render();
1641 
1642  $this->tpl->setVariable("APPLIED_USERS",$tbl->tpl->get());
1643 
1644  return true;
1645  }
__setTableGUIBasicData(&$tbl, &$result_set, $from="")
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __toUnix()

ilObjUserFolderGUI::__toUnix (   $a_time_arr)

Definition at line 1710 of file class.ilObjUserFolderGUI.php.

Referenced by editAppliedUsersObject(), and updateAppliedUsersObject().

1711  {
1712  return mktime($a_time_arr["hour"],
1713  $a_time_arr["minute"],
1714  $a_time_arr["second"],
1715  $a_time_arr["month"],
1716  $a_time_arr["day"],
1717  $a_time_arr["year"]);
1718  }
+ Here is the caller graph for this function:

◆ _goto()

static ilObjUserFolderGUI::_goto (   $a_user)
static

goto target group

Definition at line 2942 of file class.ilObjUserFolderGUI.php.

References $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilUtil\redirect(), ilUtil\sendFailure(), and USER_FOLDER_ID.

2943  {
2944  global $ilAccess, $ilErr, $lng;
2945 
2946  $a_target = USER_FOLDER_ID;
2947 
2948  if ($ilAccess->checkAccess("read", "", $a_target))
2949  {
2950  ilUtil::redirect("ilias.php?baseClass=ilAdministrationGUI&ref_id=".$a_target."&jmpToUser=".$a_user);
2951  exit;
2952  }
2953  else
2954  {
2955  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
2956  {
2957  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
2958  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
2960  }
2961  }
2962  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2963  }
exit
Definition: login.php:54
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const USER_FOLDER_ID
Class ilObjUserFolder.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ activateUsersObject()

ilObjUserFolderGUI::activateUsersObject ( )

Activate users.

Definition at line 776 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

777  {
778  $_POST["selectedAction"] = "activate";
779  $this->showActionConfirmation($_POST["selectedAction"]);
780  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjUserFolderGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 3155 of file class.ilObjUserFolderGUI.php.

References ilSecuritySettings\_getInstance(), ilAdministrationSettingsFormHandler\FORM_SECURITY, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

3156  {
3157  switch($a_form_id)
3158  {
3160 
3161  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
3162  $security = ilSecuritySettings::_getInstance();
3163 
3164  $fields = array();
3165 
3166  $subitems = array(
3167  'ps_password_change_on_first_login_enabled' => array($security->isPasswordChangeOnFirstLoginEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3168  'ps_password_must_not_contain_loginame' => array((bool)$security->getPasswordMustNotContainLoginnameStatus(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3169  'ps_password_chars_and_numbers_enabled' => array($security->isPasswordCharsAndNumbersEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3170  'ps_password_special_chars_enabled' => array($security->isPasswordSpecialCharsEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
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()
3176  );
3177  $fields['ps_password_settings'] = array(null, null, $subitems);
3178 
3179  $subitems = array(
3180  'ps_login_max_attempts' => (int)$security->getLoginMaxAttempts(),
3181  'ps_prevent_simultaneous_logins' => array($security->isPreventionOfSimultaneousLoginsEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
3182  );
3183  $fields['ps_security_protection'] = array(null, null, $subitems);
3184 
3185  return array(array("generalSettings", $fields));
3186  }
3187  }
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ addUserAutoCompleteObject()

ilObjUserFolderGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

Definition at line 240 of file class.ilObjUserFolderGUI.php.

References $_REQUEST, exit, and ilUserAutoComplete\MAX_ENTRIES.

241  {
242  include_once './Services/User/classes/class.ilUserAutoComplete.php';
243  $auto = new ilUserAutoComplete();
244  $auto->setSearchFields(array('login','firstname','lastname','email'));
245  $auto->enableFieldSearchableCheck(false);
246  $auto->setMoreLinkAvailable(true);
247 
248  if(($_REQUEST['fetchall']))
249  {
250  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
251  }
252 
253  echo $auto->getList($_REQUEST['term']);
254  exit();
255  }
exit
Definition: login.php:54
Auto completion class for user lists.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

◆ addUserObject()

ilObjUserFolderGUI::addUserObject ( )

Add new user;.

Definition at line 161 of file class.ilObjUserFolderGUI.php.

References $ilCtrl.

162  {
163  global $ilCtrl;
164 
165  $ilCtrl->setParameterByClass("ilobjusergui", "new_type", "usr");
166  $ilCtrl->redirectByClass(array("iladministrationgui", "ilobjusergui"), "create");
167  }
global $ilCtrl
Definition: ilias.php:18

◆ appliedUsersObject()

ilObjUserFolderGUI::appliedUsersObject ( )

Definition at line 1387 of file class.ilObjUserFolderGUI.php.

References $_SESSION, ilObjectGUI\$ilias, __showAppliedUsersTable(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), and ilUtil\sendFailure().

Referenced by editAppliedUsersObject(), and updateAppliedUsersObject().

1388  {
1389  global $rbacsystem,$ilias;
1390 
1391  unset($_SESSION['applied_users']);
1392 
1393  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
1394  {
1395  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
1396  }
1397 
1398  if(!count($app_users =& $ilias->account->getAppliedUsers()))
1399  {
1400  ilUtil::sendFailure($this->lng->txt('no_users_applied'));
1401 
1402  return false;
1403  }
1404 
1405  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.usr_applied_users.html", "Services/User");
1406  $this->lng->loadLanguageModule('crs');
1407 
1408  $counter = 0;
1409  foreach($app_users as $usr_id)
1410  {
1411  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1412 
1413  $f_result[$counter][] = ilUtil::formCheckbox(0,"users[]",$usr_id);
1414  $f_result[$counter][] = $tmp_user->getLogin();
1415  $f_result[$counter][] = $tmp_user->getFirstname();
1416  $f_result[$counter][] = $tmp_user->getLastname();
1417 
1418  if($tmp_user->getTimeLimitUnlimited())
1419  {
1420  $f_result[$counter][] = "<b>".$this->lng->txt('crs_unlimited')."</b>";
1421  }
1422  else
1423  {
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());
1426 
1427  $f_result[$counter][] = $limit;
1428  }
1429  ++$counter;
1430  }
1431 
1432  $this->__showAppliedUsersTable($f_result);
1433 
1434  return true;
1435  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
__showAppliedUsersTable($a_result_set)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilterObject()

ilObjUserFolderGUI::applyFilterObject ( )

Apply filter.

Definition at line 173 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

174  {
175  global $ilTabs;
176 
177  include_once("./Services/User/classes/class.ilUserTableGUI.php");
178  $utab = new ilUserTableGUI($this, "view");
179  $utab->resetOffset();
180  $utab->writeFilterToSession();
181  $this->viewObject();
182  $ilTabs->activateTab("usrf");
183  }
viewObject()
list childs of current object
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ cancelDeleteExportFileObject()

ilObjUserFolderGUI::cancelDeleteExportFileObject ( )

cancel deletion of export files

Definition at line 2455 of file class.ilObjUserFolderGUI.php.

2456  {
2457  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2458  }

◆ cancelNewAccountMailObject()

ilObjUserFolderGUI::cancelNewAccountMailObject ( )

Definition at line 2727 of file class.ilObjUserFolderGUI.php.

2728  {
2729  $this->ctrl->redirect($this, "settings");
2730  }

◆ cancelSearchActionObject()

ilObjUserFolderGUI::cancelSearchActionObject ( )

Definition at line 404 of file class.ilObjUserFolderGUI.php.

405  {
406  $this->ctrl->redirectByClass('ilrepositorysearchgui', 'showSearchResults');
407  }

◆ cancelUserFolderActionObject()

ilObjUserFolderGUI::cancelUserFolderActionObject ( )

Definition at line 399 of file class.ilObjUserFolderGUI.php.

400  {
401  $this->ctrl->redirect($this, 'view');
402  }

◆ chooseLetterObject()

ilObjUserFolderGUI::chooseLetterObject ( )

Choose first letter.

Parameters

Definition at line 263 of file class.ilObjUserFolderGUI.php.

References $ilCtrl.

264  {
265  global $ilCtrl;
266 
267  $ilCtrl->redirect($this, "view");
268  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmaccessFreeObject()

ilObjUserFolderGUI::confirmaccessFreeObject ( )

Definition at line 482 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilUser, and ilUtil\sendSuccess().

483  {
484  global $rbacsystem, $ilUser;
485 
486  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
487  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
488  {
489  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
490  }
491 
492  // FOR ALL SELECTED OBJECTS
493  foreach ($_POST["id"] as $id)
494  {
495  // instatiate correct object class (usr)
496  $obj = $this->ilias->obj_factory->getInstanceByObjId($id);
497  $obj->setTimeLimitUnlimited(1);
498  $obj->setTimeLimitFrom("");
499  $obj->setTimeLimitUntil("");
500  $obj->setTimeLimitMessage(0);
501  $obj->update();
502  }
503 
504  // Feedback
505  ilUtil::sendSuccess($this->lng->txt("access_free_granted"),true);
506 
507  if ($_POST["frsrch"])
508  {
509  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
510  }
511  else
512  {
513  $this->ctrl->redirect($this, "view");
514  }
515  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ confirmaccessRestrictObject()

ilObjUserFolderGUI::confirmaccessRestrictObject ( )

Definition at line 574 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilUser, IL_CAL_UNIX, initAccessRestrictionForm(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and setAccessRestrictionObject().

575  {
576  $form = $this->initAccessRestrictionForm();
577  if(!$form->checkInput())
578  {
579  return $this->setAccessRestrictionObject($form);
580  }
581 
582  $timefrom = $form->getItemByPostVar("from")->getDate()->get(IL_CAL_UNIX);
583  $timeuntil = $form->getItemByPostVar("to")->getDate()->get(IL_CAL_UNIX);
584  if ($timeuntil <= $timefrom)
585  {
586  ilUtil::sendFailure($this->lng->txt("time_limit_not_valid"));
587  return $this->setAccessRestrictionObject($form);
588  }
589 
590  global $rbacsystem, $ilUser;
591 
592  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
593  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
594  {
595  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
596  }
597 
598  // FOR ALL SELECTED OBJECTS
599  foreach ($_POST["id"] as $id)
600  {
601  // instatiate correct object class (usr)
602  $obj = $this->ilias->obj_factory->getInstanceByObjId($id);
603  $obj->setTimeLimitUnlimited(0);
604  $obj->setTimeLimitFrom($timefrom);
605  $obj->setTimeLimitUntil($timeuntil);
606  $obj->setTimeLimitMessage(0);
607  $obj->update();
608  }
609 
610  // Feedback
611  ilUtil::sendSuccess($this->lng->txt("access_restricted"),true);
612 
613  if ($_POST["frsrch"])
614  {
615  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
616  }
617  else
618  {
619  $this->ctrl->redirect($this, "view");
620  }
621  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
const IL_CAL_UNIX
redirection script todo: (a better solution should control the processing via a xml file) ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initAccessRestrictionForm($a_from_search=false)
global $ilUser
Definition: imgupload.php:15
setAccessRestrictionObject($a_form=null, $a_from_search=false)
+ Here is the call graph for this function:

◆ confirmactivateObject()

ilObjUserFolderGUI::confirmactivateObject ( )

Set the selected users active.

public

Definition at line 414 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilUser, and ilUtil\sendSuccess().

415  {
416  global $rbacsystem, $ilUser;
417 
418  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
419  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
420  {
421  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
422  }
423 
424  // FOR ALL SELECTED OBJECTS
425  foreach ($_POST["id"] as $id)
426  {
427  // instatiate correct object class (usr)
428  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
429  $obj->setActive(TRUE, $ilUser->getId());
430  $obj->update();
431  }
432 
433  ilUtil::sendSuccess($this->lng->txt("user_activated"),true);
434 
435  if ($_POST["frsrch"])
436  {
437  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
438  }
439  else
440  {
441  $this->ctrl->redirect($this, "view");
442  }
443  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ confirmdeactivateObject()

ilObjUserFolderGUI::confirmdeactivateObject ( )

Set the selected users inactive.

public

Definition at line 450 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilUser, and ilUtil\sendSuccess().

451  {
452  global $rbacsystem, $ilUser;
453 
454  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
455  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
456  {
457  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
458  }
459 
460  // FOR ALL SELECTED OBJECTS
461  foreach ($_POST["id"] as $id)
462  {
463  // instatiate correct object class (usr)
464  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
465  $obj->setActive(FALSE, $ilUser->getId());
466  $obj->update();
467  }
468 
469  // Feedback
470  ilUtil::sendSuccess($this->lng->txt("user_deactivated"),true);
471 
472  if ($_POST["frsrch"])
473  {
474  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
475  }
476  else
477  {
478  $this->ctrl->redirect($this, "view");
479  }
480  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ confirmDeleteExportFileObject()

ilObjUserFolderGUI::confirmDeleteExportFileObject ( )

confirmation screen for export file deletion

Definition at line 2427 of file class.ilObjUserFolderGUI.php.

References $_POST, $file, and ilUtil\getTypeIconPath().

2428  {
2429  if(!isset($_POST["file"]))
2430  {
2431  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2432  }
2433 
2434  // display confirmation message
2435  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2436  $cgui = new ilConfirmationGUI();
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");
2441 
2442  // BEGIN TABLE DATA
2443  foreach($_POST["file"] as $file)
2444  {
2445  $cgui->addItem("file[]", $file, $file, ilUtil::getTypeIconPath("usrf"), $this->lng->txt("obj_usrf"));
2446  }
2447 
2448  $this->tpl->setContent($cgui->getHTML());
2449  }
print $file
$_POST['username']
Definition: cron.php:12
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...
redirection script todo: (a better solution should control the processing via a xml file) ...
Confirmation screen class.
+ Here is the call graph for this function:

◆ confirmdeleteObject()

ilObjUserFolderGUI::confirmdeleteObject ( )

confirm delete Object

public

Definition at line 628 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilCtrl, $ilUser, ilUtil\sendFailure(), and ilUtil\sendSuccess().

629  {
630  global $rbacsystem, $ilCtrl, $ilUser;
631 
632  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
633  if (!$rbacsystem->checkAccess('delete',$this->object->getRefId()))
634  {
635  ilUtil::sendFailure($this->lng->txt("msg_no_perm_delete"), true);
636  $ilCtrl->redirect($this, "view");
637  }
638 
639  if (in_array($ilUser->getId(), $_POST["id"]))
640  {
641  $this->ilias->raiseError($this->lng->txt("msg_no_delete_yourself"),$this->ilias->error_obj->WARNING);
642  }
643 
644  // FOR ALL SELECTED OBJECTS
645  foreach ($_POST["id"] as $id)
646  {
647  // instatiate correct object class (usr)
648  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
649  $obj->delete();
650  }
651 
652  // Feedback
653  ilUtil::sendSuccess($this->lng->txt("user_deleted"),true);
654 
655  if ($_POST["frsrch"])
656  {
657  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
658  }
659  else
660  {
661  $this->ctrl->redirect($this, "view");
662  }
663  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ confirmSavedObject()

ilObjUserFolderGUI::confirmSavedObject ( )

Definition at line 2186 of file class.ilObjUserFolderGUI.php.

References saveGlobalUserSettingsObject().

2187  {
2188  $this->saveGlobalUserSettingsObject("save");
2189  }
+ Here is the call graph for this function:

◆ deactivateUsersObject()

ilObjUserFolderGUI::deactivateUsersObject ( )

Deactivate users.

Definition at line 785 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

786  {
787  $_POST["selectedAction"] = "deactivate";
788  $this->showActionConfirmation($_POST["selectedAction"]);
789  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ deleteExportFileObject()

ilObjUserFolderGUI::deleteExportFileObject ( )

delete export files

Definition at line 2464 of file class.ilObjUserFolderGUI.php.

References $_POST, and $file.

2465  {
2466  $export_dir = $this->object->getExportDirectory();
2467  foreach($_POST["file"] as $file)
2468  {
2469  $file = basename($file);
2470 
2471  $exp_file = $export_dir."/".$file;
2472  if (@is_file($exp_file))
2473  {
2474  unlink($exp_file);
2475  }
2476  }
2477  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2478  }
print $file
$_POST['username']
Definition: cron.php:12

◆ deleteUsersObject()

ilObjUserFolderGUI::deleteUsersObject ( )

Delete users.

Definition at line 767 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

768  {
769  $_POST["selectedAction"] = "delete";
770  $this->showActionConfirmation($_POST["selectedAction"]);
771  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ downloadExportFileObject()

ilObjUserFolderGUI::downloadExportFileObject ( )

Download selected export files.

Sends a selected export file for download

Definition at line 2406 of file class.ilObjUserFolderGUI.php.

References $_POST, $file, and ilUtil\deliverFile().

2407  {
2408  if(!isset($_POST["file"]))
2409  {
2410  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2411  }
2412 
2413  if (count($_POST["file"]) > 1)
2414  {
2415  $this->ilias->raiseError($this->lng->txt("select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2416  }
2417 
2418  $file = basename($_POST["file"][0]);
2419 
2420  $export_dir = $this->object->getExportDirectory();
2421  ilUtil::deliverFile($export_dir."/".$file, $file);
2422  }
print $file
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ editAppliedUsersObject()

ilObjUserFolderGUI::editAppliedUsersObject ( )

Definition at line 1437 of file class.ilObjUserFolderGUI.php.

References $_POST, $_SESSION, __getDateSelect(), __toUnix(), ilObject\_getIcon(), appliedUsersObject(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), ilUtil\sendFailure(), and ilUtil\sendInfo().

Referenced by updateAppliedUsersObject().

1438  {
1439  global $rbacsystem;
1440 
1441  if(!$rbacsystem->checkAccess("write", $this->ref_id))
1442  {
1443  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
1444  }
1445 
1446  $this->lng->loadLanguageModule('crs');
1447 
1448  $_POST['users'] = $_SESSION['applied_users'] = ($_SESSION['applied_users'] ? $_SESSION['applied_users'] : $_POST['users']);
1449 
1450  if(!isset($_SESSION['error_post_vars']))
1451  {
1452  ilUtil::sendInfo($this->lng->txt('time_limit_add_time_limit_for_selected'));
1453  }
1454 
1455  if(!count($_POST["users"]))
1456  {
1457  ilUtil::sendFailure($this->lng->txt("time_limit_no_users_selected"));
1458  $this->appliedUsersObject();
1459 
1460  return false;
1461  }
1462 
1463  $counter = 0;
1464  foreach($_POST['users'] as $usr_id)
1465  {
1466  if($counter)
1467  {
1468  $title .= ', ';
1469  }
1470  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1471  $title .= $tmp_user->getLogin();
1472  ++$counter;
1473  }
1474  if(strlen($title) > 79)
1475  {
1476  $title = substr($title,0,80);
1477  $title .= '...';
1478  }
1479 
1480 
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));
1483 
1484  // LOAD SAVED DATA IN CASE OF ERROR
1485  $time_limit_unlimited = $_SESSION["error_post_vars"]["au"]["time_limit_unlimited"] ?
1486  1 : 0;
1487 
1488  $time_limit_start = $_SESSION["error_post_vars"]["au"]["time_limit_start"] ?
1489  $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_start"]) :
1490  time();
1491  $time_limit_end = $_SESSION["error_post_vars"]["au"]["time_limit_end"] ?
1492  $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_end"]) :
1493  time();
1494 
1495 
1496  // SET TEXT VARIABLES
1497  $this->tpl->setVariable("ALT_IMG",$this->lng->txt("obj_usr"));
1498  $this->tpl->setVariable("TYPE_IMG",ilObject::_getIcon("", "", "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"));
1506 
1507 
1508 
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())
1530  {
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();
1536  }
1537  else
1538  {
1539  $this->tpl->setVariable("ROWSPAN",2);
1540  }
1541  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__getDateSelect($a_type, $a_varname, $a_selected)
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilObjUserFolderGUI::executeCommand ( )

Definition at line 52 of file class.ilObjUserFolderGUI.php.

References $cmd, $ret, getUserMultiCommands(), ilObjectGUI\prepareOutput(), and setSubTabs().

53  {
54  global $ilTabs;
55 
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58  $this->prepareOutput();
59 
60  switch($next_class)
61  {
62  case 'ilusertablegui':
63  include_once("./Services/User/classes/class.ilUserTableGUI.php");
64  $u_table = new ilUserTableGUI($this, "view");
65  $u_table->initFilter();
66  $this->ctrl->setReturn($this,'view');
67  $this->ctrl->forwardCommand($u_table);
68  break;
69 
70  case 'ilpermissiongui':
71  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
72  $perm_gui =& new ilPermissionGUI($this);
73  $ret =& $this->ctrl->forwardCommand($perm_gui);
74  break;
75 
76  case 'ilrepositorysearchgui':
77  include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
78  $user_search =& new ilRepositorySearchGUI();
79  $user_search->setTitle($this->lng->txt("search_user_extended")); // #17502
80  $user_search->enableSearchableCheck(false);
81  $user_search->setCallback(
82  $this,
83  'searchResultHandler',
84  $this->getUserMultiCommands(true)
85  );
86  $this->tabs_gui->setTabActive('search_user_extended');
87  $this->ctrl->setReturn($this,'view');
88  $ret =& $this->ctrl->forwardCommand($user_search);
89  break;
90 
91  case 'ilaccountcodesgui':
92  $this->tabs_gui->setTabActive('settings');
93  $this->setSubTabs("settings");
94  $ilTabs->activateSubTab("account_codes");
95  include_once("./Services/User/classes/class.ilAccountCodesGUI.php");
96  $acc = new ilAccountCodesGUI($this->ref_id);
97  $this->ctrl->forwardCommand($acc);
98  break;
99 
100  case 'ilcustomuserfieldsgui':
101  $this->tabs_gui->setTabActive('settings');
102  $this->setSubTabs("settings");
103  $ilTabs->activateSubTab("user_defined_fields");
104  include_once("./Services/User/classes/class.ilCustomUserFieldsGUI.php");
105  $cf = new ilCustomUserFieldsGUI();
106  $this->ctrl->forwardCommand($cf);
107  break;
108 
109  default:
110  if(!$cmd)
111  {
112  $cmd = "view";
113  }
114  $cmd .= "Object";
115 
116  $this->$cmd();
117 
118  break;
119  }
120  return true;
121  }
setSubTabs($a_tab)
set sub tabs
GUI class for account codes.
$cmd
Definition: sahs_server.php:35
TableGUI class for user administration.
Class ilCustomUserFieldsGUI.
getUserMultiCommands($a_search_form=false)
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ exportObject()

ilObjUserFolderGUI::exportObject ( )

Global user settings.

Allows to define global settings for user accounts

Note: The Global user settings form allows to specify default values for some user preferences. To avoid redundant implementations, specification of default values can be done elsewhere in ILIAS are not supported by this form.

Definition at line 2490 of file class.ilObjUserFolderGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$ilias, exit, ilDatePresentation\formatDate(), ilUtil\getImagePath(), IL_CAL_UNIX, and ilUtil\switchColor().

2491  {
2492  global $ilias, $ilCtrl;
2493 
2494  if ($_POST["cmd"]["export"])
2495  {
2496  $this->object->buildExportFile($_POST["export_type"]);
2497  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2498  exit;
2499  }
2500 
2501  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.usr_export.html','Services/User');
2502 
2503  $export_types = array(
2504  "userfolder_export_excel_x86",
2505  "userfolder_export_csv",
2506  "userfolder_export_xml"
2507  );
2508 
2509  // create table
2510  include_once("./Services/Table/classes/class.ilTableGUI.php");
2511  $tbl = new ilTableGUI();
2512 
2513  // load files templates
2514  $this->tpl->addBlockfile("EXPORT_FILES", "export_files", "tpl.table.html");
2515 
2516  // load template for table content data
2517  $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.usr_export_file_row.html", "Services/User");
2518 
2519  $num = 0;
2520 
2521  $tbl->setTitle($this->lng->txt("userfolder_export_files"));
2522 
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"));
2526 
2527  $tbl->enabled["sort"] = false;
2528  $tbl->setColumnWidth(array("1%", "49%", "25%", "25%"));
2529 
2530  // control
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); // ???
2536 
2537 
2538  $this->tpl->setVariable("COLUMN_COUNTS", 4);
2539 
2540  // delete button
2541  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
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();
2547 
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();
2552 
2553  // footer
2554  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
2555  //$tbl->disable("footer");
2556 
2557  $export_files = $this->object->getExportFiles();
2558 
2559  $tbl->setMaxCount(count($export_files));
2560  $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
2561 
2562  $tbl->render();
2563 
2564  if(count($export_files) > 0)
2565  {
2566  $i=0;
2567  foreach($export_files as $exp_file)
2568  {
2569  $this->tpl->setCurrentBlock("tbl_content");
2570  $this->tpl->setVariable("TXT_FILENAME", $exp_file["filename"]);
2571 
2572  $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
2573  $this->tpl->setVariable("CSS_ROW", $css_row);
2574 
2575  $this->tpl->setVariable("TXT_SIZE", $exp_file["filesize"]);
2576  $this->tpl->setVariable("CHECKBOX_ID", $exp_file["filename"]);
2577 
2578  $file_arr = explode("__", $exp_file["filename"]);
2579  $this->tpl->setVariable('TXT_DATE',ilDatePresentation::formatDate(new ilDateTime($file_arr[0],IL_CAL_UNIX)));
2580 
2581  $this->tpl->parseCurrentBlock();
2582  }
2583 
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();
2588  } //if is_array
2589  /*
2590  else
2591 
2592  {
2593  $this->tpl->setCurrentBlock("notfound");
2594  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
2595  $this->tpl->setVariable("NUM_COLS", 3);
2596  $this->tpl->parseCurrentBlock();
2597  }
2598  */
2599 
2600  $this->tpl->parseCurrentBlock();
2601 
2602 
2603  foreach ($export_types as $export_type)
2604  {
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();
2609  }
2610 
2611  $this->tpl->setVariable("EXPORT_BUTTON", $this->lng->txt("create_export_file"));
2612  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2613  }
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilTableGUI.
const IL_CAL_UNIX
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
+ Here is the call graph for this function:

◆ freeAccessObject()

ilObjUserFolderGUI::freeAccessObject ( )

Free access.

Definition at line 803 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

804  {
805  $_POST["selectedAction"] = "accessFree";
806  $this->showActionConfirmation($_POST["selectedAction"]);
807  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ generalSettingsObject()

ilObjUserFolderGUI::generalSettingsObject ( )
protected

Show user account general settings.

Returns

Definition at line 1730 of file class.ilObjUserFolderGUI.php.

References $ilSetting, ilSecuritySettings\_getInstance(), ilSessionControl\DEFAULT_MAX_COUNT, ilSessionControl\DEFAULT_MAX_IDLE, ilSessionControl\DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST, ilSessionControl\DEFAULT_MIN_IDLE, ilUserAccountSettings\getInstance(), initFormGeneralSettings(), and ilSession\SESSION_HANDLING_FIXED.

1731  {
1732  global $ilSetting;
1733 
1734  $this->initFormGeneralSettings();
1735 
1736  include_once './Services/User/classes/class.ilUserAccountSettings.php';
1738 
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;
1741 
1742  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1743  $security = ilSecuritySettings::_getInstance();
1744 
1745  $this->form->setValuesByArray(
1746  array(
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'),
1754  // 'user_ext_profiles' => (int)$ilSetting->get('user_ext_profiles')
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'),
1758 
1759  'session_handling_type' => $ilSetting->get('session_handling_type', ilSession::SESSION_HANDLING_FIXED),
1760  'session_reminder_enabled' => $ilSetting->get('session_reminder_enabled'),
1761  'session_max_count' => $ilSetting->get('session_max_count', ilSessionControl::DEFAULT_MAX_COUNT),
1762  'session_min_idle' => $ilSetting->get('session_min_idle', ilSessionControl::DEFAULT_MIN_IDLE),
1763  'session_max_idle' => $ilSetting->get('session_max_idle', ilSessionControl::DEFAULT_MAX_IDLE),
1764  'session_max_idle_after_first_request' => $ilSetting->get('session_max_idle_after_first_request', ilSessionControl::DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST),
1765 
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(),
1776 
1777  'login_max_attempts' => $security->getLoginMaxAttempts(),
1778  'ps_prevent_simultaneous_logins' => (int)$security->isPreventionOfSimultaneousLoginsEnabled(),
1779  'password_assistance' => (bool)$ilSetting->get("password_assistance")
1780  )
1781  );
1782 
1783  $this->tpl->setContent($this->form->getHTML());
1784  }
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet ...
initFormGeneralSettings()
init general settings form
const SESSION_HANDLING_FIXED
global $ilSetting
Definition: privfeed.php:40
static getInstance()
Singelton get instance.
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ getActionUserIds()

ilObjUserFolderGUI::getActionUserIds ( )
protected

Get selected items for table action.

Returns
array

Definition at line 670 of file class.ilObjUserFolderGUI.php.

References $_POST, and ilUserTableGUI\MODE_USER_FOLDER.

Referenced by initAccessRestrictionForm(), mailObject(), showActionConfirmation(), usrExportCsvObject(), usrExportX86Object(), and usrExportXmlObject().

671  {
672  if($_POST["select_cmd_all"])
673  {
674  include_once("./Services/User/classes/class.ilUserTableGUI.php");
675  $utab = new ilUserTableGUI($this, "view", ilUserTableGUI::MODE_USER_FOLDER, false);
676  return $utab->getUserIdsForFilter();
677  }
678  else
679  {
680  return $_POST["id"];
681  }
682  }
$_POST['username']
Definition: cron.php:12
TableGUI class for user administration.
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjUserFolderGUI::getAdminTabs ( $tabs_gui)

Definition at line 2763 of file class.ilObjUserFolderGUI.php.

References getTabs().

2764  {
2765  $this->getTabs($tabs_gui);
2766  }
getTabs(&$tabs_gui)
get tabs public
+ Here is the call graph for this function:

◆ getImportDir()

ilObjUserFolderGUI::getImportDir ( )

get user import directory name

Definition at line 892 of file class.ilObjUserFolderGUI.php.

References $ilUser, ilUtil\getDataDir(), and ilUtil\makeDirParents().

Referenced by importCancelledObject(), importUserRoleAssignmentObject(), and importUsersObject().

893  {
894  // For each user session a different directory must be used to prevent
895  // that one user session overwrites the import data that another session
896  // is currently importing.
897  global $ilUser;
898  $importDir = ilUtil::getDataDir().'/user_import/usr_'.$ilUser->getId().'_'.session_id();
899  ilUtil::makeDirParents($importDir);
900  return $importDir;
901  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static getDataDir()
get data directory (outside webspace)
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjUserFolderGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Definition at line 2773 of file class.ilObjUserFolderGUI.php.

Referenced by getAdminTabs().

2774  {
2775  include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
2776 
2777  global $rbacsystem;
2778 
2779  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
2780  {
2781  $tabs_gui->addTarget("usrf",
2782  $this->ctrl->getLinkTarget($this, "view"), array("view","delete","resetFilter", "userAction", ""), "", "");
2783 
2784  $tabs_gui->addTarget(
2785  "search_user_extended",
2786  $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI',''),
2787  array(),
2788  "ilrepositorysearchgui",
2789  ""
2790  );
2791  }
2792 
2793  if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
2794  {
2795  $tabs_gui->addTarget("settings",
2796  $this->ctrl->getLinkTarget($this, "generalSettings"),array('settings','generalSettings','listUserDefinedField','newAccountMail'));
2797 
2798  $tabs_gui->addTarget("export",
2799  $this->ctrl->getLinkTarget($this, "export"), "export", "", "");
2800 
2801  /* deprecated, JF 27 May 2013
2802  if(ilObjUserTracking::_enabledLearningProgress() &&
2803  ilObjUserTracking::_enabledUserRelatedData())
2804  {
2805  $tabs_gui->addTarget("learning_progress",
2806  $this->ctrl->getLinkTarget($this, "learningProgress"), "learningProgress", "", "");
2807  }
2808  */
2809  }
2810 
2811  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
2812  {
2813  $tabs_gui->addTarget("perm_settings",
2814  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
2815  array("perm","info","owner"), 'ilpermissiongui');
2816  }
2817  }
+ Here is the caller graph for this function:

◆ getUserMultiCommands()

ilObjUserFolderGUI::getUserMultiCommands (   $a_search_form = false)

Definition at line 3003 of file class.ilObjUserFolderGUI.php.

References $cmd, and $ilUser.

Referenced by executeCommand().

3004  {
3005  global $rbacsystem, $ilUser;
3006 
3007  // see searchResultHandler()
3008  if($a_search_form)
3009  {
3010  $cmds = array(
3011  'activate' => $this->lng->txt('activate'),
3012  'deactivate' => $this->lng->txt('deactivate'),
3013  'accessRestrict' => $this->lng->txt('accessRestrict'),
3014  'accessFree' => $this->lng->txt('accessFree')
3015  );
3016 
3017  if ($rbacsystem->checkAccess('delete', $this->object->getRefId()))
3018  {
3019  $cmds["delete"] = $this->lng->txt("delete");
3020  }
3021  }
3022  // show confirmation
3023  else
3024  {
3025  $cmds = array(
3026  'activateUsers' => $this->lng->txt('activate'),
3027  'deactivateUsers' => $this->lng->txt('deactivate'),
3028  'restrictAccess' => $this->lng->txt('accessRestrict'),
3029  'freeAccess' => $this->lng->txt('accessFree')
3030  );
3031 
3032  if ($rbacsystem->checkAccess('delete', $this->object->getRefId()))
3033  {
3034  $cmds["deleteUsers"] = $this->lng->txt("delete");
3035  }
3036  }
3037 
3038  // no confirmation needed
3039  $export_types = array("userfolder_export_excel_x86", "userfolder_export_csv", "userfolder_export_xml");
3040  foreach ($export_types as $type)
3041  {
3042  $cmd = explode("_", $type);
3043  $cmd = array_pop($cmd);
3044  $cmds['usrExport'.ucfirst($cmd)] = $this->lng->txt('export').' - '.
3045  $this->lng->txt($type);
3046  }
3047 
3048  // check if current user may send mails
3049  include_once "Services/Mail/classes/class.ilMail.php";
3050  $mail = new ilMail($ilUser->getId());
3051  if($rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId()))
3052  {
3053  $cmds["mail"] = $this->lng->txt("send_mail");
3054  }
3055 
3056  return $cmds;
3057  }
$cmd
Definition: sahs_server.php:35
Class Mail this class handles base functions for mail handling.
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ getUserOwnerId()

ilObjUserFolderGUI::getUserOwnerId ( )

Definition at line 47 of file class.ilObjUserFolderGUI.php.

References USER_FOLDER_ID.

Referenced by importUsersObject().

48  {
49  return $this->user_owner_id ? $this->user_owner_id : USER_FOLDER_ID;
50  }
const USER_FOLDER_ID
Class ilObjUserFolder.
+ Here is the caller graph for this function:

◆ hitsperpageObject()

ilObjUserFolderGUI::hitsperpageObject ( )

Definition at line 1720 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

1721  {
1722  parent::hitsperpageObject();
1723  $this->viewObject();
1724  }
viewObject()
list childs of current object
+ Here is the call graph for this function:

◆ ilObjUserFolderGUI()

ilObjUserFolderGUI::ilObjUserFolderGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 27 of file class.ilObjUserFolderGUI.php.

References $ilCtrl, and ilObjectGUI\ilObjectGUI().

28  {
29  global $ilCtrl;
30 
31  // TODO: move this to class.ilias.php
32  define('USER_FOLDER_ID',7);
33 
34  $this->type = "usrf";
35  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
36 
37  $this->lng->loadLanguageModule('search');
38  $this->lng->loadLanguageModule("user");
39 
40  $ilCtrl->saveParameter($this, "letter");
41  }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ importCancelledObject()

ilObjUserFolderGUI::importCancelledObject ( )

import cancelled

private

Definition at line 869 of file class.ilObjUserFolderGUI.php.

References $_GET, ilUtil\delDir(), and getImportDir().

870  {
871  // purge user import directory
872  $import_dir = $this->getImportDir();
873  if (@is_dir($import_dir))
874  {
875  ilUtil::delDir($import_dir);
876  }
877 
878  if (strtolower($_GET["baseClass"]) == 'iladministrationgui')
879  {
880  $this->ctrl->redirect($this, "view");
881  //ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location));
882  }
883  else
884  {
885  $this->ctrl->redirectByClass('ilobjcategorygui','listUsers');
886  }
887  }
getImportDir()
get user import directory name
$_GET["client_id"]
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ importUserFormObject()

ilObjUserFolderGUI::importUserFormObject ( )

display form for user import

Definition at line 817 of file class.ilObjUserFolderGUI.php.

References $_GET, ilObjectGUI\$tpl, and initUserImportForm().

818  {
819  global $tpl, $rbacsystem;
820 
821  // Blind out tabs for local user import
822  if ($_GET["baseClass"] == 'ilRepositoryGUI')
823  {
824  $this->tabs_gui->clearTargets();
825  }
826 
827  if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
828  {
829  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
830  }
831 
832  $this->initUserImportForm();
833  $tpl->setContent($this->form->getHTML());
834  }
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
initUserImportForm()
Init user import form.
+ Here is the call graph for this function:

◆ importUserRoleAssignmentObject()

ilObjUserFolderGUI::importUserRoleAssignmentObject ( )

display form for user import

Definition at line 906 of file class.ilObjUserFolderGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, $n, $path, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjRole\_getAssignUsersStatus(), ilObjUserFolder\_lookupNewAccountMail(), ilUtil\delDir(), ilUtil\formSelect(), ilUtil\getDir(), getImportDir(), IL_EXTRACT_ROLES, IL_IGNORE_ON_CONFLICT, IL_IMPORT_FAILURE, IL_IMPORT_SUCCESS, IL_IMPORT_WARNING, IL_UPDATE_ON_CONFLICT, IL_VERIFY, initUserImportForm(), ilUtil\makeDir(), ilUtil\moveUploadedFile(), ilUtil\unzip(), and USER_FOLDER_ID.

907  {
908  global $ilUser,$rbacreview, $tpl, $lng, $ilCtrl;;
909 
910  // Blind out tabs for local user import
911  if ($_GET["baseClass"] == 'ilRepositoryGUI')
912  {
913  $this->tabs_gui->clearTargets();
914  }
915 
916  $this->initUserImportForm();
917  if ($this->form->checkInput())
918  {
919  include_once './Services/AccessControl/classes/class.ilObjRole.php';
920  include_once './Services/User/classes/class.ilUserImportParser.php';
921 
922  global $rbacreview, $rbacsystem, $tree, $lng;
923 
924 
925  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.usr_import_roles.html", "Services/User");
926 
927  $import_dir = $this->getImportDir();
928 
929  // recreate user import directory
930  if (@is_dir($import_dir))
931  {
932  ilUtil::delDir($import_dir);
933  }
934  ilUtil::makeDir($import_dir);
935 
936  // move uploaded file to user import directory
937  $file_name = $_FILES["importFile"]["name"];
938  $parts = pathinfo($file_name);
939  $full_path = $import_dir."/".$file_name;
940 
941  // check if import file exists
942  if (!is_file($_FILES["importFile"]["tmp_name"]))
943  {
944  ilUtil::delDir($import_dir);
945  $this->ilias->raiseError($this->lng->txt("no_import_file_found")
946  , $this->ilias->error_obj->MESSAGE);
947  }
948  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"],
949  $_FILES["importFile"]["name"], $full_path);
950 
951  // handle zip file
952  if (strtolower($parts["extension"]) == "zip")
953  {
954  // unzip file
955  ilUtil::unzip($full_path);
956 
957  $xml_file = null;
958  $file_list = ilUtil::getDir($import_dir);
959  foreach ($file_list as $a_file)
960  {
961  if (substr($a_file['entry'],-4) == '.xml')
962  {
963  $xml_file = $import_dir."/".$a_file['entry'];
964  break;
965  }
966  }
967  if (is_null($xml_file))
968  {
969  $subdir = basename($parts["basename"],".".$parts["extension"]);
970  $xml_file = $import_dir."/".$subdir."/".$subdir.".xml";
971  }
972  }
973  // handle xml file
974  else
975  {
976  $xml_file = $full_path;
977  }
978 
979  // check xml file
980  if (!is_file($xml_file))
981  {
982  ilUtil::delDir($import_dir);
983  $this->ilias->raiseError($this->lng->txt("no_xml_file_found_in_zip")
984  ." ".$subdir."/".$subdir.".xml", $this->ilias->error_obj->MESSAGE);
985  }
986 
987  require_once("./Services/User/classes/class.ilUserImportParser.php");
988 
989  // Verify the data
990  // ---------------
991  $importParser = new ilUserImportParser($xml_file, IL_VERIFY);
992  $importParser->startParsing();
993  switch ($importParser->getErrorLevel())
994  {
995  case IL_IMPORT_SUCCESS :
996  break;
997  case IL_IMPORT_WARNING :
998  $this->tpl->setVariable("IMPORT_LOG", $importParser->getProtocolAsHTML($lng->txt("verification_warning_log")));
999  break;
1000  case IL_IMPORT_FAILURE :
1001  ilUtil::delDir($import_dir);
1002  $this->ilias->raiseError(
1003  $lng->txt("verification_failed").$importParser->getProtocolAsHTML($lng->txt("verification_failure_log")),
1004  $this->ilias->error_obj->MESSAGE
1005  );
1006  return;
1007  }
1008 
1009  // Create the role selection form
1010  // ------------------------------
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);
1022 
1023  // Extract the roles
1024  $importParser = new ilUserImportParser($xml_file, IL_EXTRACT_ROLES);
1025  $importParser->startParsing();
1026  $roles = $importParser->getCollectedRoles();
1027 
1028  // get global roles
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)
1033  {
1034  // check assignment permission if called from local admin
1035  if($this->object->getRefId() != USER_FOLDER_ID)
1036  {
1037  if(!in_array(SYSTEM_ROLE_ID,$roles_of_user) && !ilObjRole::_getAssignUsersStatus($obj_data['obj_id']))
1038  {
1039  continue;
1040  }
1041  }
1042  // exclude anonymous role from list
1043  if ($obj_data["obj_id"] != ANONYMOUS_ROLE_ID)
1044  {
1045  // do not allow to assign users to administrator role if current user does not has SYSTEM_ROLE_ID
1046  if ($obj_data["obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$roles_of_user))
1047  {
1048  $gl_roles[$obj_data["obj_id"]] = $obj_data["title"];
1049  }
1050  }
1051  }
1052 
1053  // global roles
1054  $got_globals = false;
1055  foreach($roles as $role_id => $role)
1056  {
1057  if ($role["type"] == "Global")
1058  {
1059  if (! $got_globals)
1060  {
1061  $got_globals = true;
1062 
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"));
1066  }
1067 
1068  // pre selection for role
1069  $pre_select = array_search($role[name], $gl_roles);
1070  if (! $pre_select)
1071  {
1072  switch($role["name"])
1073  {
1074  case "Administrator": // ILIAS 2/3 Administrator
1075  $pre_select = array_search("Administrator", $gl_roles);
1076  break;
1077 
1078  case "Autor": // ILIAS 2 Author
1079  $pre_select = array_search("User", $gl_roles);
1080  break;
1081 
1082  case "Lerner": // ILIAS 2 Learner
1083  $pre_select = array_search("User", $gl_roles);
1084  break;
1085 
1086  case "Gast": // ILIAS 2 Guest
1087  $pre_select = array_search("Guest", $gl_roles);
1088  break;
1089 
1090  default:
1091  $pre_select = array_search("User", $gl_roles);
1092  break;
1093  }
1094  }
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();
1100  }
1101  }
1102 
1103  // Check if local roles need to be assigned
1104  $got_locals = false;
1105  foreach($roles as $role_id => $role)
1106  {
1107  if ($role["type"] == "Local")
1108  {
1109  $got_locals = true;
1110  break;
1111  }
1112  }
1113 
1114  if ($got_locals)
1115  {
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"));
1119 
1120 
1121  // get local roles
1122  if ($this->object->getRefId() == USER_FOLDER_ID)
1123  {
1124  // The import function has been invoked from the user folder
1125  // object. In this case, we show only matching roles,
1126  // because the user folder object is considered the parent of all
1127  // local roles and may contains thousands of roles on large ILIAS
1128  // installations.
1129  $loc_roles = array();
1130  foreach($roles as $role_id => $role)
1131  {
1132  if ($role["type"] == "Local")
1133  {
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;
1139  }
1140  }
1141  }
1142  }
1143  } else {
1144  // The import function has been invoked from a locally
1145  // administrated category. In this case, we show all roles
1146  // contained in the subtree of the category.
1147  $loc_roles = $rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1148  }
1149  $l_roles = array();
1150 
1151  // create a search array with .
1152  $l_roles_mailbox_searcharray = array();
1153  foreach ($loc_roles as $key => $loc_role)
1154  {
1155  // fetch context path of role
1156  $rolf = $rbacreview->getFoldersAssignedToRole($loc_role,true);
1157 
1158  // only process role folders that are not set to status "deleted"
1159  // and for which the user has write permissions.
1160  // We also don't show the roles which are in the ROLE_FOLDER_ID folder.
1161  // (The ROLE_FOLDER_ID folder contains the global roles).
1162  if (
1163  !$rbacreview->isDeleted($rolf[0]) &&
1164  $rbacsystem->checkAccess('write',$rolf[0]) &&
1165  $rolf[0] != ROLE_FOLDER_ID
1166  )
1167  {
1168  // A local role is only displayed, if it is contained in the subtree of
1169  // the localy administrated category. If the import function has been
1170  // invoked from the user folder object, we show all local roles, because
1171  // the user folder object is considered the parent of all local roles.
1172  // Thus, if we start from the user folder object, we initialize the
1173  // isInSubtree variable with true. In all other cases it is initialized
1174  // with false, and only set to true if we find the object id of the
1175  // locally administrated category in the tree path to the local role.
1176  $isInSubtree = $this->object->getRefId() == USER_FOLDER_ID;
1177 
1178  $path_array = array();
1179  if ($this->tree->isInTree($rolf[0]))
1180  {
1181  // Create path. Paths which have more than 4 segments
1182  // are truncated in the middle.
1183  $tmpPath = $this->tree->getPathFull($rolf[0]);
1184  $tmpPath[] = $rolf[0];//adds target item to list
1185 
1186  for ($i = 1, $n = count($tmpPath) - 1; $i < $n; $i++)
1187  {
1188  if ($i < 3 || $i > $n - 3)
1189  {
1190  $path_array[] = $tmpPath[$i]['title'];
1191  }
1192  else if ($i == 3 || $i == $n - 3)
1193  {
1194  $path_array[] = '...';
1195  }
1196 
1197  $isInSubtree |= $tmpPath[$i]['obj_id'] == $this->object->getId();
1198  }
1199  //revert this path for a better readability in dropdowns #18306
1200  $path = implode(" < ", array_reverse($path_array));
1201 
1202  }
1203  else
1204  {
1205  $path = "<b>Rolefolder ".$rolf[0]." not found in tree! (Role ".$loc_role.")</b>";
1206  }
1207  $roleMailboxAddress = $rbacreview->getRoleMailboxAddress($loc_role);
1208  $l_roles[$loc_role] = $roleMailboxAddress.', '.$path;
1209  }
1210  } //foreach role
1211 
1212  $l_roles[""] = "";
1213  natcasesort($l_roles);
1214  $l_roles[""] = $this->lng->txt("usrimport_ignore_role");
1215  foreach($roles as $role_id => $role)
1216  {
1217  if ($role["type"] == "Local")
1218  {
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] : "";
1224  if ($this->object->getRefId() == USER_FOLDER_ID) {
1225  // There are too many roles in a large ILIAS installation
1226  // that's why whe show only a choice with the the option "ignore",
1227  // and the matching roles.
1228  $selectable_roles = array();
1229  $selectable_roles[""] = $this->lng->txt("usrimport_ignore_role");
1230  foreach ($matching_role_ids as $id)
1231  {
1232  $selectable_roles[$id] = $l_roles[$id];
1233  }
1234  $role_select = ilUtil::formSelect($pre_select, "role_assign[".$role_id."]", $selectable_roles, false, true);
1235  } else {
1236  $role_select = ilUtil::formSelect($pre_select, "role_assign[".$role_id."]", $l_roles, false, true);
1237  }
1238  $this->tpl->setVariable("SELECT_LOCAL_ROLE", $role_select);
1239  $this->tpl->parseCurrentBlock();
1240  }
1241  }
1242  }
1243  //
1244 
1245  $this->tpl->setVariable("TXT_CONFLICT_HANDLING", $lng->txt("conflict_handling"));
1246  $handlers = array(
1247  IL_IGNORE_ON_CONFLICT => "ignore_on_conflict",
1248  IL_UPDATE_ON_CONFLICT => "update_on_conflict"
1249  );
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"));
1252  $this->tpl->setVariable("SELECT_CONFLICT", ilUtil::formSelect(IL_IGNORE_ON_CONFLICT, "conflict_handling_choice", $handlers, false, false));
1253 
1254  // new account mail
1255  $this->lng->loadLanguageModule("mail");
1256  include_once './Services/User/classes/class.ilObjUserFolder.php';
1257  $amail = ilObjUserFolder::_lookupNewAccountMail($this->lng->getDefaultLanguage());
1258  if (trim($amail["body"]) != "" && trim($amail["subject"]) != "")
1259  {
1260  $this->tpl->setCurrentBlock("inform_user");
1261  $this->tpl->setVariable("TXT_ACCOUNT_MAIL", $lng->txt("mail_account_mail"));
1262  if (true)
1263  {
1264  $this->tpl->setVariable("SEND_MAIL", " checked=\"checked\"");
1265  }
1266  $this->tpl->setVariable("TXT_INFORM_USER_MAIL",
1267  $this->lng->txt("user_send_new_account_mail"));
1268  $this->tpl->parseCurrentBlock();
1269  }
1270  }
1271  else
1272  {
1273  $this->form->setValuesByPost();
1274  $tpl->setContent($this->form->getHtml());
1275  }
1276  }
getImportDir()
get user import directory name
$_GET["client_id"]
const IL_IMPORT_FAILURE
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
const IL_EXTRACT_ROLES
const IL_IMPORT_WARNING
global $ilCtrl
Definition: ilias.php:18
const IL_IMPORT_SUCCESS
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
redirection script todo: (a better solution should control the processing via a xml file) ...
$n
Definition: RandomTest.php:80
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
const IL_VERIFY
global $ilUser
Definition: imgupload.php:15
_getAssignUsersStatus($a_role_id)
$path
Definition: index.php:22
const USER_FOLDER_ID
Class ilObjUserFolder.
initUserImportForm()
Init user import form.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
+ Here is the call graph for this function:

◆ importUsersObject()

ilObjUserFolderGUI::importUsersObject ( )

import users

Definition at line 1281 of file class.ilObjUserFolderGUI.php.

References $_GET, $_POST, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tree, ilObjRole\_getAssignUsersStatus(), ilUtil\delDir(), getImportDir(), getUserOwnerId(), IL_IGNORE_ON_CONFLICT, IL_IMPORT_FAILURE, IL_IMPORT_SUCCESS, IL_IMPORT_WARNING, IL_UPDATE_ON_CONFLICT, IL_USER_IMPORT, ilUtil\sendInfo(), ilUtil\sendSuccess(), and USER_FOLDER_ID.

1282  {
1283  global $rbacreview,$ilUser;
1284 
1285  // Blind out tabs for local user import
1286  if ($_GET["baseClass"] == 'ilRepositoryGUI')
1287  {
1288  $this->tabs_gui->clearTargets();
1289  }
1290 
1291  include_once './Services/AccessControl/classes/class.ilObjRole.php';
1292  include_once './Services/User/classes/class.ilUserImportParser.php';
1293 
1294  global $rbacreview, $rbacsystem, $tree, $lng;
1295 
1296  switch ($_POST["conflict_handling_choice"])
1297  {
1298  case "update_on_conflict" :
1299  $rule = IL_UPDATE_ON_CONFLICT;
1300  break;
1301  case "ignore_on_conflict" :
1302  default :
1303  $rule = IL_IGNORE_ON_CONFLICT;
1304  break;
1305  }
1306  $importParser = new ilUserImportParser($_POST["xml_file"], IL_USER_IMPORT, $rule);
1307  $importParser->setFolderId($this->getUserOwnerId());
1308  $import_dir = $this->getImportDir();
1309 
1310  // Catch hack attempts
1311  // We check here again, if the role folders are in the tree, and if the
1312  // user has permission on the roles.
1313  if ($_POST["role_assign"])
1314  {
1315  $global_roles = $rbacreview->getGlobalRoles();
1316  $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1317  foreach ($_POST["role_assign"] as $role_id)
1318  {
1319  if ($role_id != "")
1320  {
1321  if (in_array($role_id, $global_roles))
1322  {
1323  if(!in_array(SYSTEM_ROLE_ID,$roles_of_user))
1324  {
1325  if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID,$roles_of_user)
1326  || ($this->object->getRefId() != USER_FOLDER_ID
1327  && ! ilObjRole::_getAssignUsersStatus($role_id))
1328  )
1329  {
1330  ilUtil::delDir($import_dir);
1331  $this->ilias->raiseError($this->lng->txt("usrimport_with_specified_role_not_permitted"),
1332  $this->ilias->error_obj->MESSAGE);
1333  }
1334  }
1335  }
1336  else
1337  {
1338  $rolf = $rbacreview->getFoldersAssignedToRole($role_id,true);
1339  if ($rbacreview->isDeleted($rolf[0])
1340  || ! $rbacsystem->checkAccess('write',$rolf[0]))
1341  {
1342  ilUtil::delDir($import_dir);
1343  $this->ilias->raiseError($this->lng->txt("usrimport_with_specified_role_not_permitted"),
1344  $this->ilias->error_obj->MESSAGE);
1345  return;
1346  }
1347  }
1348  }
1349  }
1350  }
1351 
1352  $importParser->setRoleAssignment($_POST["role_assign"]);
1353  $importParser->startParsing();
1354 
1355  // purge user import directory
1356  ilUtil::delDir($import_dir);
1357 
1358  switch ($importParser->getErrorLevel())
1359  {
1360  case IL_IMPORT_SUCCESS :
1361  ilUtil::sendSuccess($this->lng->txt("user_imported"), true);
1362  break;
1363  case IL_IMPORT_WARNING :
1364  ilUtil::sendInfo($this->lng->txt("user_imported_with_warnings").$importParser->getProtocolAsHTML($lng->txt("import_warning_log")), true);
1365  break;
1366  case IL_IMPORT_FAILURE :
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
1371  );
1372  break;
1373  }
1374 
1375  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
1376  {
1377  $this->ctrl->redirect($this, "view");
1378  //ilUtil::redirect($this->ctrl->getLinkTarget($this));
1379  }
1380  else
1381  {
1382  $this->ctrl->redirectByClass('ilobjcategorygui','listUsers');
1383  }
1384  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
getImportDir()
get user import directory name
$_GET["client_id"]
const IL_USER_IMPORT
const IL_IMPORT_FAILURE
const IL_IMPORT_WARNING
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const IL_IMPORT_SUCCESS
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
_getAssignUsersStatus($a_role_id)
const USER_FOLDER_ID
Class ilObjUserFolder.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
+ Here is the call graph for this function:

◆ initAccessRestrictionForm()

ilObjUserFolderGUI::initAccessRestrictionForm (   $a_from_search = false)
protected

Definition at line 529 of file class.ilObjUserFolderGUI.php.

References $_POST, getActionUserIds(), ilUtil\sendFailure(), ilFormPropertyGUI\setRequired(), ilDateTimeInputGUI\setShowTime(), and ilObjectGUI\viewObject().

Referenced by confirmaccessRestrictObject(), and setAccessRestrictionObject().

530  {
531  $user_ids = $this->getActionUserIds();
532  if(!$user_ids)
533  {
534  ilUtil::sendFailure($this->lng->txt('select_one'));
535  return $this->viewObject();
536  }
537 
538  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
539  $form = new ilPropertyFormGUI();
540  $form->setTitle($this->lng->txt("time_limit_add_time_limit_for_selected"));
541  $form->setFormAction($this->ctrl->getFormAction($this, "confirmaccessRestrict"));
542 
543  $from = new ilDateTimeInputGUI($this->lng->txt("access_from"), "from");
544  $from->setShowTime(true);
545  $from->setRequired(true);
546  $form->addItem($from);
547 
548  $to = new ilDateTimeInputGUI($this->lng->txt("access_until"), "to");
549  $to->setRequired(true);
550  $to->setShowTime(true);
551  $form->addItem($to);
552 
553  $form->addCommandButton("confirmaccessRestrict", $this->lng->txt("confirm"));
554  $form->addCommandButton("view", $this->lng->txt("cancel"));
555 
556  foreach($user_ids as $user_id)
557  {
558  $ufield = new ilHiddenInputGUI("id[]");
559  $ufield->setValue($user_id);
560  $form->addItem($ufield);
561  }
562 
563  // return to search?
564  if($a_from_search || $_POST["frsrch"])
565  {
566  $field = new ilHiddenInputGUI("frsrch");
567  $field->setValue(1);
568  $form->addItem($field);
569  }
570 
571  return $form;
572  }
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
viewObject()
list childs of current object
This class represents a date/time property in a property form.
getActionUserIds()
Get selected items for table action.
This class represents a hidden form property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setRequired($a_required)
Set Required.
setShowTime($a_showtime)
Set Show Time Information.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormGeneralSettings()

ilObjUserFolderGUI::initFormGeneralSettings ( )
protected

init general settings form

Returns

Definition at line 1904 of file class.ilObjUserFolderGUI.php.

References $ilSetting, $log, $pass, ilFormat\_secondsToString(), ilSubEnabledFormPropertyGUI\addSubItem(), ilNumberInputGUI\allowDecimals(), ilSessionControl\DEFAULT_ALLOW_CLIENT_MAINTENANCE, ilSession\getSessionExpireValue(), ilSession\SESSION_HANDLING_FIXED, ilSession\SESSION_HANDLING_LOAD_DEPENDENT, ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilTextInputGUI\setMaxLength(), setSubTabs(), ilCheckboxInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by generalSettingsObject(), and saveGeneralSettingsObject().

1905  {
1906  global $ilSetting;
1907 
1908  $this->setSubTabs('settings');
1909  $this->tabs_gui->setTabActive('settings');
1910  $this->tabs_gui->setSubTabActive('general_settings');
1911 
1912  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1913  $this->form = new ilPropertyFormGUI();
1914  $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveGeneralSettings'));
1915 
1916  $this->form->setTitle($this->lng->txt('general_settings'));
1917 
1918  $lua = new ilCheckboxInputGUI($this->lng->txt('enable_local_user_administration'),'lua');
1919  $lua->setInfo($this->lng->txt('enable_local_user_administration_info'));
1920  $lua->setValue(1);
1921  $this->form->addItem($lua);
1922 
1923  $lrua = new ilCheckboxInputGUI($this->lng->txt('restrict_user_access'),'lrua');
1924  $lrua->setInfo($this->lng->txt('restrict_user_access_info'));
1925  $lrua->setValue(1);
1926  $this->form->addItem($lrua);
1927 
1928  // enable alphabetical navigation in user administration
1929  $alph = new ilCheckboxInputGUI($this->lng->txt('user_adm_enable_alpha_nav'), 'user_adm_alpha_nav');
1930  //$alph->setInfo($this->lng->txt('restrict_user_access_info'));
1931  $alph->setValue(1);
1932  $this->form->addItem($alph);
1933 
1934  // account codes
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);
1938 
1939  // delete own account
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);
1944 
1945 
1946  // BEGIN SESSION SETTINGS
1947 
1948  // create session handling radio group
1949  $ssettings = new ilRadioGroupInputGUI($this->lng->txt('sess_mode'), 'session_handling_type');
1950 
1951  // first option, fixed session duration
1952  $fixed = new ilRadioOption($this->lng->txt('sess_fixed_duration'), ilSession::SESSION_HANDLING_FIXED);
1953 
1954  // create session reminder subform
1955  $cb = new ilCheckboxInputGUI($this->lng->txt("session_reminder"), "session_reminder_enabled");
1956  $expires = ilSession::getSessionExpireValue();
1957  $time = ilFormat::_secondsToString($expires, true);
1958  $cb->setInfo($this->lng->txt("session_reminder_info")."<br />".
1959  sprintf($this->lng->txt('session_reminder_session_duration'), $time));
1960  $fixed->addSubItem($cb);
1961 
1962  // add session handling to radio group
1963  $ssettings->addOption($fixed);
1964 
1965  // second option, session control
1966  $ldsh = new ilRadioOption($this->lng->txt('sess_load_dependent_session_handling'), ilSession::SESSION_HANDLING_LOAD_DEPENDENT);
1967 
1968  // add session control subform
1969  require_once('Services/Authentication/classes/class.ilSessionControl.php');
1970 
1971  // this is the max count of active sessions
1972  // that are getting started simlutanously
1973  $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_count'), 'session_max_count');
1974  $sub_ti->setMaxLength(5);
1975  $sub_ti->setSize(5);
1976  $sub_ti->setInfo($this->lng->txt('session_max_count_info'));
1977  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1978  $sub_ti->setDisabled(true);
1979  $ldsh->addSubItem($sub_ti);
1980 
1981  // after this (min) idle time the session can be deleted,
1982  // if there are further requests for new sessions,
1983  // but max session count is reached yet
1984  $sub_ti = new ilTextInputGUI($this->lng->txt('session_min_idle'), 'session_min_idle');
1985  $sub_ti->setMaxLength(5);
1986  $sub_ti->setSize(5);
1987  $sub_ti->setInfo($this->lng->txt('session_min_idle_info'));
1988  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1989  $sub_ti->setDisabled(true);
1990  $ldsh->addSubItem($sub_ti);
1991 
1992  // after this (max) idle timeout the session expires
1993  // and become invalid, so it is not considered anymore
1994  // when calculating current count of active sessions
1995  $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_idle'), 'session_max_idle');
1996  $sub_ti->setMaxLength(5);
1997  $sub_ti->setSize(5);
1998  $sub_ti->setInfo($this->lng->txt('session_max_idle_info'));
1999  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
2000  $sub_ti->setDisabled(true);
2001  $ldsh->addSubItem($sub_ti);
2002 
2003  // this is the max duration that can elapse between the first and the secnd
2004  // request to the system before the session is immidietly deleted
2005  $sub_ti = new ilTextInputGUI(
2006  $this->lng->txt('session_max_idle_after_first_request'),
2007  'session_max_idle_after_first_request'
2008  );
2009  $sub_ti->setMaxLength(5);
2010  $sub_ti->setSize(5);
2011  $sub_ti->setInfo($this->lng->txt('session_max_idle_after_first_request_info'));
2012  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
2013  $sub_ti->setDisabled(true);
2014  $ldsh->addSubItem($sub_ti);
2015 
2016  // add session control to radio group
2017  $ssettings->addOption($ldsh);
2018 
2019  // add radio group to form
2020  if( $ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
2021  {
2022  // just shows the status wether the session
2023  //setting maintenance is allowed by setup
2024  $this->form->addItem($ssettings);
2025  }
2026  else
2027  {
2028  // just shows the status wether the session
2029  //setting maintenance is allowed by setup
2030  $ti = new ilNonEditableValueGUI($this->lng->txt('session_config'), "session_config");
2031  $ti->setValue($this->lng->txt('session_config_maintenance_disabled'));
2032  $ssettings->setDisabled(true);
2033  $ti->addSubItem($ssettings);
2034  $this->form->addItem($ti);
2035  }
2036 
2037  // END SESSION SETTINGS
2038 
2039 
2040  $this->lng->loadLanguageModule('ps');
2041 
2042  $pass = new ilFormSectionHeaderGUI();
2043  $pass->setTitle($this->lng->txt('ps_password_settings'));
2044  $this->form->addItem($pass);
2045 
2046  // password generation
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);
2051 
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);
2055 
2056  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2057 
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);
2061 
2062  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_chars_and_numbers_enabled'),'password_chars_and_numbers_enabled');
2063  //$check->setOptionTitle($this->lng->txt('ps_password_chars_and_numbers_enabled'));
2064  $check->setInfo($this->lng->txt('ps_password_chars_and_numbers_enabled_info'));
2065  $this->form->addItem($check);
2066 
2067  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_special_chars_enabled'),'password_special_chars_enabled');
2068  //$check->setOptionTitle($this->lng->txt('ps_password_special_chars_enabled'));
2069  $check->setInfo($this->lng->txt('ps_password_special_chars_enabled_info'));
2070  $this->form->addItem($check);
2071 
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'));
2074  $text->setSize(1);
2075  $text->setMaxLength(2);
2076  $this->form->addItem($text);
2077 
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'));
2080  $text->setSize(2);
2081  $text->setMaxLength(3);
2082  $this->form->addItem($text);
2083 
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);
2087  $text->setSize(2);
2088  $text->setMaxLength(3);
2089  $this->form->addItem($text);
2090 
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);
2094  $text->setSize(2);
2095  $text->setMaxLength(3);
2096  $this->form->addItem($text);
2097 
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'));
2100  $text->setSize(2);
2101  $text->setMaxLength(3);
2102  $this->form->addItem($text);
2103 
2104  // password assistance
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);
2108 
2109  $pass = new ilFormSectionHeaderGUI();
2110  $pass->setTitle($this->lng->txt('ps_security_protection'));
2111  $this->form->addItem($pass);
2112 
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'));
2115  $text->setSize(1);
2116  $text->setMaxLength(2);
2117  $this->form->addItem($text);
2118 
2119  // prevent login from multiple pcs at the same time
2120  $objCb = new ilCheckboxInputGUI($this->lng->txt('ps_prevent_simultaneous_logins'), 'ps_prevent_simultaneous_logins');
2121  $objCb->setValue(1);
2122  $objCb->setInfo($this->lng->txt('ps_prevent_simultaneous_logins_info'));
2123  $this->form->addItem($objCb);
2124 
2125 
2126 
2127 
2128  $log = new ilFormSectionHeaderGUI();
2129  $log->setTitle($this->lng->txt('loginname_settings'));
2130  $this->form->addItem($log);
2131 
2132  $chbChangeLogin = new ilCheckboxInputGUI($this->lng->txt('allow_change_loginname'), 'allow_change_loginname');
2133  $chbChangeLogin->setValue(1);
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);
2138 
2139  $chbChangeLogin->addSubItem($chbCreateHistory);
2140  $chbReuseLoginnames = new ilCheckboxInputGUI($this->lng->txt('reuse_of_loginnames_contained_in_history'), 'reuse_of_loginnames');
2141  $chbReuseLoginnames->setValue(1);
2142  $chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
2143 
2144  $chbChangeLogin->addSubItem($chbReuseLoginnames);
2145  $chbChangeBlockingTime = new ilNumberInputGUI($this->lng->txt('loginname_change_blocking_time'), 'loginname_change_blocking_time');
2146  $chbChangeBlockingTime->allowDecimals(true);
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);
2152 
2153  $this->form->addCommandButton('saveGeneralSettings', $this->lng->txt('save'));
2154  }
setSubTabs($a_tab)
set sub tabs
This class represents an option in a radio group.
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
This class represents a email property in a property form.
const SESSION_HANDLING_FIXED
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
setInfo($a_info)
Set Info.
allowDecimals($a_value)
Toggle Decimals.
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
const SESSION_HANDLING_LOAD_DEPENDENT
static getSessionExpireValue()
Returns the session expiration value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initLoginSettingsForm()

ilObjUserFolderGUI::initLoginSettingsForm ( )
private

Definition at line 2865 of file class.ilObjUserFolderGUI.php.

References ilNumberInputGUI\allowDecimals(), ilFormGUI\setFormAction(), ilFormPropertyGUI\setInfo(), setSubTabs(), and ilCheckboxInputGUI\setValue().

Referenced by saveLoginnameSettingsObject(), and showLoginnameSettingsObject().

2866  {
2867  $this->setSubTabs('settings');
2868  $this->tabs_gui->setTabActive('settings');
2869  $this->tabs_gui->setSubTabActive('loginname_settings');
2870 
2871  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2872  $this->loginSettingsForm = new ilPropertyFormGUI;
2873  $this->loginSettingsForm->setFormAction($this->ctrl->getFormAction($this, 'saveLoginnameSettings'));
2874  $this->loginSettingsForm->setTitle($this->lng->txt('loginname_settings'));
2875 
2876  $chbChangeLogin = new ilCheckboxInputGUI($this->lng->txt('allow_change_loginname'), 'allow_change_loginname');
2877  $chbChangeLogin->setValue(1);
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');
2884  $chbReuseLoginnames->setValue(1);
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');
2888  $chbChangeBlockingTime->allowDecimals(true);
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);
2894 
2895  $this->loginSettingsForm->addCommandButton('saveLoginnameSettings', $this->lng->txt('save'));
2896  }
setSubTabs($a_tab)
set sub tabs
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
allowDecimals($a_value)
Toggle Decimals.
setInfo($a_info)
Set Information Text.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initNewAccountMailForm()

ilObjUserFolderGUI::initNewAccountMailForm ( )
protected

Definition at line 2615 of file class.ilObjUserFolderGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilUtil\getImagePath(), ilTextInputGUI\setValue(), ilFileInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by newAccountMailObject().

2616  {
2617  global $lng, $ilCtrl;
2618 
2619  $lng->loadLanguageModule("meta");
2620  $lng->loadLanguageModule("mail");
2621 
2622  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2623  $form = new ilPropertyFormGUI();
2624  $form->setFormAction($ilCtrl->getFormAction($this));
2625 
2626  $form->setTitleIcon(ilUtil::getImagePath("icon_mail.svg"));
2627  $form->setTitle($lng->txt("user_new_account_mail"));
2628  $form->setDescription($lng->txt("user_new_account_mail_desc"));
2629 
2630  $langs = $lng->getInstalledLanguages();
2631  foreach($langs as $lang_key)
2632  {
2633  $amail = $this->object->_lookupNewAccountMail($lang_key);
2634 
2635  $title = $lng->txt("meta_l_".$lang_key);
2636  if ($lang_key == $lng->getDefaultLanguage())
2637  {
2638  $title .= " (".$lng->txt("default").")";
2639  }
2640 
2641  $header = new ilFormSectionHeaderGUI();
2642  $header->setTitle($title);
2643  $form->addItem($header);
2644 
2645  $subj = new ilTextInputGUI($lng->txt("subject"), "subject_".$lang_key);
2646  // $subj->setRequired(true);
2647  $subj->setValue($amail["subject"]);
2648  $form->addItem($subj);
2649 
2650  $salg = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_".$lang_key);
2651  // $salg->setRequired(true);
2652  $salg->setValue($amail["sal_g"]);
2653  $form->addItem($salg);
2654 
2655  $salf = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_".$lang_key);
2656  // $salf->setRequired(true);
2657  $salf->setValue($amail["sal_f"]);
2658  $form->addItem($salf);
2659 
2660  $salm = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_".$lang_key);
2661  // $salm->setRequired(true);
2662  $salm->setValue($amail["sal_m"]);
2663  $form->addItem($salm);
2664 
2665  $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_".$lang_key);
2666  // $body->setRequired(true);
2667  $body->setValue($amail["body"]);
2668  $body->setRows(10);
2669  $body->setCols(100);
2670  $form->addItem($body);
2671 
2672  $att = new ilFileInputGUI($lng->txt("attachment"), "att_".$lang_key);
2673  $att->setAllowDeletion(true);
2674  if($amail["att_file"])
2675  {
2676  $att->setValue($amail["att_file"]);
2677  }
2678  $form->addItem($att);
2679  }
2680 
2681  $form->addCommandButton("saveNewAccountMail", $lng->txt("save"));
2682  $form->addCommandButton("cancelNewAccountMail", $lng->txt("cancel"));
2683 
2684  return $form;
2685  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a file property in a property form.
setValue($a_value)
Set Value.
global $ilCtrl
Definition: ilias.php:18
setValue($a_value)
Set Value.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class represents a text property in a property form.
This class represents a text area property in a property form.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserImportForm()

ilObjUserFolderGUI::initUserImportForm ( )

Init user import form.

Parameters
int$a_modeEdit Mode

Definition at line 841 of file class.ilObjUserFolderGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFileInputGUI\setSuffixes().

Referenced by importUserFormObject(), and importUserRoleAssignmentObject().

842  {
843  global $lng, $ilCtrl;
844 
845  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
846  $this->form = new ilPropertyFormGUI();
847 
848  // Import File
849  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
850  $fi = new ilFileInputGUI($lng->txt("import_file"), "importFile");
851  $fi->setSuffixes(array("xml", "zip"));
852  //$fi->enableFileNameSelection();
853  //$fi->setInfo($lng->txt(""));
854  $this->form->addItem($fi);
855 
856  $this->form->addCommandButton("importUserRoleAssignment", $lng->txt("import"));
857  $this->form->addCommandButton("importCancelled", $lng->txt("cancel"));
858 
859  $this->form->setTitle($lng->txt("import_users"));
860  $this->form->setFormAction($ilCtrl->getFormAction($this));
861 
862  }
This class represents a property form user interface.
This class represents a file property in a property form.
global $ilCtrl
Definition: ilias.php:18
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jumpToUserObject()

ilObjUserFolderGUI::jumpToUserObject ( )

Jump to edit screen for user.

Definition at line 2968 of file class.ilObjUserFolderGUI.php.

References $_GET, $ilCtrl, and ilObject\_lookupType().

2969  {
2970  global $ilCtrl;
2971 
2972  if (((int) $_GET["jmpToUser"]) > 0 && ilObject::_lookupType((int)$_GET["jmpToUser"]) == "usr")
2973  {
2974  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", (int) $_GET["jmpToUser"]);
2975  $ilCtrl->redirectByClass("ilobjusergui", "view");
2976  }
2977  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:

◆ learningProgressObject()

ilObjUserFolderGUI::learningProgressObject ( )

Definition at line 123 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\$tpl, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), and exit.

124  {
125  global $rbacsystem, $tpl;
126 
127  // deprecated JF 27 May 2013
128  exit();
129 
130  if (!$rbacsystem->checkAccess("read",$this->object->getRefId()) ||
133  {
134  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
135  }
136 
137  include_once "Services/User/classes/class.ilUserLPTableGUI.php";
138  $tbl = new ilUserLPTableGUI($this, "learningProgress", $this->object->getRefId());
139 
140  $tpl->setContent($tbl->getHTML());
141  }
exit
Definition: login.php:54
Learning progress account list for user administration.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ mailObject()

ilObjUserFolderGUI::mailObject ( )

Definition at line 3095 of file class.ilObjUserFolderGUI.php.

References $ilUser, getActionUserIds(), ilMail\getSavedData(), ilMailingList\MODE_TEMPORARY, ilUtil\redirect(), ilMail\savePostData(), ilUtil\sendFailure(), and ilObjectGUI\viewObject().

Referenced by showActionConfirmation().

3096  {
3097  global $ilUser;
3098 
3099  $user_ids = $this->getActionUserIds();
3100  if(!$user_ids)
3101  {
3102  ilUtil::sendFailure($this->lng->txt('select_one'));
3103  return $this->viewObject();
3104  }
3105 
3106  // remove existing (temporary) lists
3107  include_once "Services/Contact/classes/class.ilMailingLists.php";
3108  $list = new ilMailingLists($ilUser);
3109  $list->deleteTemporaryLists();
3110 
3111  // create (temporary) mailing list
3112  include_once "Services/Contact/classes/class.ilMailingList.php";
3113  $list = new ilMailingList($ilUser);
3114  $list->setMode(ilMailingList::MODE_TEMPORARY);
3115  $list->setTitle("-TEMPORARY SYSTEM LIST-");
3116  $list->setDescription("-USER ACCOUNTS MAIL-");
3117  $list->setCreateDate(date("Y-m-d H:i:s"));
3118  $list->insert();
3119  $list_id = $list->getId();
3120 
3121  // after list has been saved...
3122  foreach($user_ids as $user_id)
3123  {
3124  $list->assignAddressbookEntry($user_id);
3125  }
3126 
3127  include_once "Services/Mail/classes/class.ilFormatMail.php";
3128  $umail = new ilFormatMail($ilUser->getId());
3129  $mail_data = $umail->getSavedData();
3130 
3131  if(!is_array($mail_data))
3132  {
3133  $mail_data = array("user_id" => $ilUser->getId());
3134  }
3135 
3136  // ???
3137  // $mail_data = $umail->appendSearchResult(array('#il_ml_'.$list_id), 'to');
3138 
3139  $umail->savePostData(
3140  $mail_data['user_id'],
3141  $mail_data['attachments'],
3142  '#il_ml_'.$list_id, // $mail_data['rcp_to'],
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']
3150  );
3151 
3152  ilUtil::redirect("ilias.php?baseClass=ilMailGUI&type=search_res");
3153  }
getSavedData()
get saved data public
viewObject()
list childs of current object
getActionUserIds()
Get selected items for table action.
Class UserMail this class handles user mails.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
static redirect($a_script)
http redirect to other script
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newAccountMailObject()

ilObjUserFolderGUI::newAccountMailObject ( )

new account mail administration

Definition at line 2690 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\$lng, initNewAccountMailForm(), and setSubTabs().

2691  {
2692  global $lng;
2693 
2694  $this->setSubTabs('settings');
2695  $this->tabs_gui->setTabActive('settings');
2696  $this->tabs_gui->setSubTabActive('user_new_account_mail');
2697 
2698  $form = $this->initNewAccountMailForm();
2699 
2700  $ftpl = new ilTemplate('tpl.usrf_new_account_mail.html', true, true, 'Services/User');
2701  $ftpl->setVariable("FORM", $form->getHTML());
2702  unset($form);
2703 
2704  // placeholder help text
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"));
2723 
2724  $this->tpl->setContent($ftpl->get());
2725  }
setSubTabs($a_tab)
set sub tabs
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjUserFolderGUI::resetFilterObject ( )

Reset filter (note: this function existed before data table filter has been introduced.

Definition at line 147 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

148  {
149  include_once("./Services/User/classes/class.ilUserTableGUI.php");
150  $utab = new ilUserTableGUI($this, "view");
151  $utab->resetOffset();
152  $utab->resetFilter();
153 
154  // from "old" implementation
155  $this->viewObject(TRUE);
156  }
viewObject()
list childs of current object
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ restrictAccessObject()

ilObjUserFolderGUI::restrictAccessObject ( )

Restrict access.

Definition at line 794 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

795  {
796  $_POST["selectedAction"] = "accessRestrict";
797  $this->showActionConfirmation($_POST["selectedAction"]);
798  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ saveGeneralSettingsObject()

ilObjUserFolderGUI::saveGeneralSettingsObject ( )

Save user account settings.

Returns

Definition at line 1791 of file class.ilObjUserFolderGUI.php.

References $_POST, $ilSetting, $ilUser, $valid, ilSecuritySettings\_getInstance(), ilSessionControl\DEFAULT_ALLOW_CLIENT_MAINTENANCE, ilUserAccountSettings\getInstance(), initFormGeneralSettings(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilSession\SESSION_HANDLING_FIXED, ilSession\SESSION_HANDLING_LOAD_DEPENDENT, and ilSessionStatistics\updateLimitLog().

1792  {
1793  global $ilUser, $ilSetting;
1794 
1795  $this->initFormGeneralSettings();
1796  if($this->form->checkInput())
1797  {
1798  $valid = true;
1799 
1800  if(!strlen($this->form->getInput('loginname_change_blocking_time')))
1801  {
1802  $valid = false;
1803  $this->form->getItemByPostVar('loginname_change_blocking_time')
1804  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
1805  }
1806 
1807  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1808  $security = ilSecuritySettings::_getInstance();
1809 
1810  // account security settings
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']);
1822 
1823  if(!$security->validate($this->form))
1824  {
1825  $valid = false;
1826  }
1827 
1828  if($valid)
1829  {
1830  $security->save();
1831 
1832  include_once './Services/User/classes/class.ilUserAccountSettings.php';
1833  ilUserAccountSettings::getInstance()->enableLocalUserAdministration($this->form->getInput('lua'));
1834  ilUserAccountSettings::getInstance()->restrictUserAccess($this->form->getInput('lrua'));
1836 
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'));
1844 
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'));
1847 
1848  $ilSetting->set("passwd_auto_generate", $this->form->getInput("passwd_auto_generate"));
1849  $ilSetting->set("password_assistance", $this->form->getInput("password_assistance"));
1850 
1851  // BEGIN SESSION SETTINGS
1852  $ilSetting->set('session_handling_type',
1853  (int)$this->form->getInput('session_handling_type'));
1854 
1855  if( $this->form->getInput('session_handling_type') == ilSession::SESSION_HANDLING_FIXED )
1856  {
1857  $ilSetting->set('session_reminder_enabled',
1858  $this->form->getInput('session_reminder_enabled'));
1859  }
1860  else if( $this->form->getInput('session_handling_type') == ilSession::SESSION_HANDLING_LOAD_DEPENDENT )
1861  {
1862  require_once 'Services/Authentication/classes/class.ilSessionControl.php';
1863  if(
1864  $ilSetting->get('session_allow_client_maintenance',
1866  )
1867  {
1868  // has to be done BEFORE updating the setting!
1869  include_once "Services/Authentication/classes/class.ilSessionStatistics.php";
1870  ilSessionStatistics::updateLimitLog((int)$this->form->getInput('session_max_count'));
1871 
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'));
1880  }
1881  }
1882  // END SESSION SETTINGS
1883 
1884  ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
1885  }
1886  else
1887  {
1888  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
1889  }
1890  }
1891  else
1892  {
1893  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
1894  }
1895  $this->form->setValuesByPost();
1896  $this->tpl->setContent($this->form->getHTML());
1897  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$valid
initFormGeneralSettings()
init general settings form
const SESSION_HANDLING_FIXED
static updateLimitLog($a_new_value)
Log max session setting.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static getInstance()
Singelton get instance.
const SESSION_HANDLING_LOAD_DEPENDENT
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ saveGlobalUserSettingsObject()

ilObjUserFolderGUI::saveGlobalUserSettingsObject (   $action = "")

Definition at line 2191 of file class.ilObjUserFolderGUI.php.

References $_POST, ilObjectGUI\$ilias, $ilSetting, ilObjectGUI\$lng, $valid, ilPrivacySettings\_getInstance(), ilUserSearchOptions\_isSearchable(), ilMemberAgreement\_reset(), ilUserSearchOptions\_saveStatus(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and settingsObject().

Referenced by confirmSavedObject().

2192  {
2193  include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
2194  include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2195 
2196  global $ilias,$ilSetting;
2197 
2198  // see ilUserFieldSettingsTableGUI
2199  include_once("./Services/User/classes/class.ilUserProfile.php");
2200  $up = new ilUserProfile();
2201  $up->skipField("username");
2202  $field_properties = $up->getStandardFields();
2203  $profile_fields = array_keys($field_properties);
2204 
2205  $valid = true;
2206  foreach ($profile_fields as $field)
2207  {
2208  if ( $_POST["chb"]["required_".$field] &&
2209  !(int)$_POST['chb']['visib_reg_' . $field]
2210  ){
2211  $valid = false;
2212  break;
2213  }
2214  }
2215 
2216  if(!$valid)
2217  {
2218  global $lng;
2219  ilUtil::sendFailure($lng->txt('invalid_visible_required_options_selected'));
2220  $this->confirm_change = 1;
2221  $this->settingsObject();
2222  return;
2223  }
2224 
2225  // For the following fields, the required state can not be changed
2226  $fixed_required_fields = array(
2227  "firstname" => 1,
2228  "lastname" => 1,
2229  "upload" => 0,
2230  "password" => 0,
2231  "language" => 0,
2232  "skin_style" => 0,
2233  "hits_per_page" => 0,
2234  "show_users_online" => 0,
2235  "hide_own_online_status" => 0
2236  );
2237 
2238  // check if a course export state of any field has been added
2239  $privacy = ilPrivacySettings::_getInstance();
2240  if ($privacy->enabledCourseExport() == true &&
2241  $privacy->courseConfirmationRequired() == true &&
2242  $action != "save")
2243  {
2244  foreach ($profile_fields as $field)
2245  {
2246  if (! $ilias->getSetting("usr_settings_course_export_" . $field) && $_POST["chb"]["course_export_" . $field] == "1")
2247  {
2248  #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export'));
2249  #$this->confirm_change = 1;
2250  #$this->settingsObject();
2251  #return;
2252  }
2253  }
2254  }
2255  // Reset user confirmation
2256  if($action == 'save')
2257  {
2258  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
2260  }
2261 
2262  foreach ($profile_fields as $field)
2263  {
2264  // Enable disable searchable
2266  {
2267  ilUserSearchOptions::_saveStatus($field,(bool) $_POST['chb']['searchable_'.$field]);
2268  }
2269 
2270  if (!$_POST["chb"]["visible_".$field] && !$field_properties[$field]["visible_hide"])
2271  {
2272  $ilias->setSetting("usr_settings_hide_".$field, "1");
2273  }
2274  else
2275  {
2276  $ilias->deleteSetting("usr_settings_hide_".$field);
2277  }
2278 
2279  if (!$_POST["chb"]["changeable_" . $field] && !$field_properties[$field]["changeable_hide"])
2280  {
2281  $ilias->setSetting("usr_settings_disable_".$field, "1");
2282  }
2283  else
2284  {
2285  $ilias->deleteSetting("usr_settings_disable_".$field);
2286  }
2287 
2288  // registration visible
2289  if ((int)$_POST['chb']['visib_reg_' . $field] && !$field_properties[$field]["visib_reg_hide"])
2290  {
2291  $ilSetting->set('usr_settings_visib_reg_'.$field, '1');
2292  }
2293  else
2294  {
2295  $ilSetting->set('usr_settings_visib_reg_'.$field, '0');
2296  }
2297 
2298  if ((int)$_POST['chb']['visib_lua_' . $field])
2299  {
2300 
2301  $ilSetting->set('usr_settings_visib_lua_'.$field, '1');
2302  }
2303  else
2304  {
2305  $ilSetting->set('usr_settings_visib_lua_'.$field, '0');
2306  }
2307 
2308  if ((int)$_POST['chb']['changeable_lua_' . $field])
2309  {
2310 
2311  $ilSetting->set('usr_settings_changeable_lua_'.$field, '1');
2312  }
2313  else
2314  {
2315  $ilSetting->set('usr_settings_changeable_lua_'.$field, '0');
2316  }
2317 
2318  if ($_POST["chb"]["export_" . $field] && !$field_properties[$field]["export_hide"])
2319  {
2320  $ilias->setSetting("usr_settings_export_".$field, "1");
2321  }
2322  else
2323  {
2324  $ilias->deleteSetting("usr_settings_export_".$field);
2325  }
2326 
2327  // Course export/visibility
2328  if ($_POST["chb"]["course_export_" . $field] && !$field_properties[$field]["course_export_hide"])
2329  {
2330  $ilias->setSetting("usr_settings_course_export_".$field, "1");
2331  }
2332  else
2333  {
2334  $ilias->deleteSetting("usr_settings_course_export_".$field);
2335  }
2336 
2337  // Group export/visibility
2338  if ($_POST["chb"]["group_export_" . $field] && !$field_properties[$field]["group_export_hide"])
2339  {
2340  $ilias->setSetting("usr_settings_group_export_".$field, "1");
2341  }
2342  else
2343  {
2344  $ilias->deleteSetting("usr_settings_group_export_".$field);
2345  }
2346 
2347  $is_fixed = array_key_exists($field, $fixed_required_fields);
2348  if ($is_fixed && $fixed_required_fields[$field] || ! $is_fixed && $_POST["chb"]["required_".$field])
2349  {
2350  $ilias->setSetting("require_".$field, "1");
2351  }
2352  else
2353  {
2354  $ilias->deleteSetting("require_" . $field);
2355  }
2356  }
2357 
2358  if ($_POST["select"]["default_hits_per_page"])
2359  {
2360  $ilias->setSetting("hits_per_page",$_POST["select"]["default_hits_per_page"]);
2361  }
2362 
2363  if ($_POST["select"]["default_show_users_online"])
2364  {
2365  $ilias->setSetting("show_users_online",$_POST["select"]["default_show_users_online"]);
2366  }
2367 
2368  if ($_POST["chb"]["export_preferences"])
2369  {
2370  $ilias->setSetting("usr_settings_export_preferences",$_POST["chb"]["export_preferences"]);
2371  } else {
2372  $ilias->deleteSetting("usr_settings_export_preferences");
2373  }
2374 
2375  $ilias->setSetting('mail_incoming_mail', (int)$_POST['select']['default_mail_incoming_mail']);
2376 
2377  ilUtil::sendSuccess($this->lng->txt("usr_settings_saved"));
2378  $this->settingsObject();
2379  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$valid
Class ilUserProfile.
settingsObject()
Global user settings.
static _reset()
Reset all.
static _saveStatus($a_key, $a_enabled)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilSetting
Definition: privfeed.php:40
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveLoginnameSettingsObject()

ilObjUserFolderGUI::saveLoginnameSettingsObject ( )

Definition at line 2898 of file class.ilObjUserFolderGUI.php.

References $ilSetting, $ilUser, $valid, initLoginSettingsForm(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

2899  {
2900  global $ilUser, $ilSetting;
2901 
2902  $this->initLoginSettingsForm();
2903  if($this->loginSettingsForm->checkInput())
2904  {
2905  $valid = true;
2906 
2907  if(!strlen($this->loginSettingsForm->getInput('loginname_change_blocking_time')))
2908  {
2909  $valid = false;
2910  $this->loginSettingsForm->getItemByPostVar('loginname_change_blocking_time')
2911  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
2912  }
2913 
2914  if($valid)
2915  {
2916  $save_blocking_time_in_seconds = (int)$this->loginSettingsForm->getInput('loginname_change_blocking_time') * 86400;
2917 
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);
2922 
2923  ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
2924  }
2925  else
2926  {
2927  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
2928  }
2929  }
2930  else
2931  {
2932  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
2933  }
2934  $this->loginSettingsForm->setValuesByPost();
2935 
2936  $this->tpl->setVariable('ADM_CONTENT', $this->loginSettingsForm->getHTML());
2937  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$valid
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveNewAccountMailObject()

ilObjUserFolderGUI::saveNewAccountMailObject ( )

Definition at line 2732 of file class.ilObjUserFolderGUI.php.

References $_POST, ilObjectGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

2733  {
2734  global $lng;
2735 
2736  $langs = $lng->getInstalledLanguages();
2737  foreach($langs as $lang_key)
2738  {
2739  $this->object->_writeNewAccountMail($lang_key,
2740  ilUtil::stripSlashes($_POST["subject_".$lang_key]),
2741  ilUtil::stripSlashes($_POST["sal_g_".$lang_key]),
2742  ilUtil::stripSlashes($_POST["sal_f_".$lang_key]),
2743  ilUtil::stripSlashes($_POST["sal_m_".$lang_key]),
2744  ilUtil::stripSlashes($_POST["body_".$lang_key]));
2745 
2746  if($_FILES["att_".$lang_key]["tmp_name"])
2747  {
2748  $this->object->_updateAccountMailAttachment($lang_key,
2749  $_FILES["att_".$lang_key]["tmp_name"],
2750  $_FILES["att_".$lang_key]["name"]);
2751  }
2752 
2753  if ($_POST["att_".$lang_key."_delete"])
2754  {
2755  $this->object->_deleteAccountMailAttachment($lang_key);
2756  }
2757  }
2758 
2759  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2760  $this->ctrl->redirect($this, "newAccountMail");
2761  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ searchResultHandler()

ilObjUserFolderGUI::searchResultHandler (   $a_usr_ids,
  $a_cmd 
)

Handles multi command from repository search gui.

Definition at line 2982 of file class.ilObjUserFolderGUI.php.

References $_POST, $cmd, ilUtil\sendFailure(), and showActionConfirmation().

2983  {
2984  if(!count((array) $a_usr_ids))
2985  {
2986  ilUtil::sendFailure($this->lng->txt('select_one'));
2987  return false;
2988  }
2989 
2990  $_POST['id'] = $a_usr_ids;
2991 
2992  // no real confirmation here
2993  if(stristr($a_cmd, "export"))
2994  {
2995  $cmd = $a_cmd."Object";
2996  return $this->$cmd();
2997  }
2998 
2999  $_POST['selectedAction'] = $a_cmd;
3000  return $this->showActionConfirmation($a_cmd, true);
3001  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
$cmd
Definition: sahs_server.php:35
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ setAccessRestrictionObject()

ilObjUserFolderGUI::setAccessRestrictionObject (   $a_form = null,
  $a_from_search = false 
)

Definition at line 517 of file class.ilObjUserFolderGUI.php.

References initAccessRestrictionForm().

Referenced by confirmaccessRestrictObject(), and showActionConfirmation().

518  {
519  if(!$a_form)
520  {
521  $a_form = $this->initAccessRestrictionForm($a_from_search);
522  }
523  $this->tpl->setContent($a_form->getHTML());
524 
525  // #10963
526  return true;
527  }
initAccessRestrictionForm($a_from_search=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubTabs()

ilObjUserFolderGUI::setSubTabs (   $a_tab)

set sub tabs

Definition at line 2823 of file class.ilObjUserFolderGUI.php.

References $ilUser.

Referenced by executeCommand(), initFormGeneralSettings(), initLoginSettingsForm(), newAccountMailObject(), and settingsObject().

2824  {
2825  global $rbacsystem,$ilUser;
2826 
2827  switch($a_tab)
2828  {
2829  case "settings":
2830  $this->tabs_gui->addSubTabTarget(
2831  'general_settings',
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"));
2844  break;
2845  }
2846  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ settingsObject()

ilObjUserFolderGUI::settingsObject ( )

Global user settings.

Allows to define global settings for user accounts

Note: The Global user settings form allows to specify default values for some user preferences. To avoid redundant implementations, specification of default values can be done elsewhere in ILIAS are not supported by this form.

Definition at line 2169 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\$ilias, ilObjectGUI\$lng, $tab, ilObjectGUI\$tpl, and setSubTabs().

Referenced by saveGlobalUserSettingsObject().

2170  {
2171  global $tpl, $lng, $ilias, $ilTabs;
2172 
2173  include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
2174  $lng->loadLanguageModule("administration");
2175  $lng->loadLanguageModule("mail");
2176  $this->setSubTabs('settings');
2177  $ilTabs->activateTab('settings');
2178  $ilTabs->activateSubTab('standard_fields');
2179 
2180  include_once("./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
2181  $tab = new ilUserFieldSettingsTableGUI($this, "settings");
2182  if($this->confirm_change) $tab->setConfirmChange();
2183  $tpl->setContent($tab->getHTML());
2184  }
setSubTabs($a_tab)
set sub tabs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUserOwnerId()

ilObjUserFolderGUI::setUserOwnerId (   $a_id)

Definition at line 43 of file class.ilObjUserFolderGUI.php.

44  {
45  $this->user_owner_id = $a_id;
46  }

◆ showActionConfirmation()

ilObjUserFolderGUI::showActionConfirmation (   $action,
  $a_from_search = false 
)

display activation confirmation screen

Definition at line 687 of file class.ilObjUserFolderGUI.php.

References ilDatePresentation\formatDate(), getActionUserIds(), IL_CAL_DATETIME, mailObject(), and setAccessRestrictionObject().

Referenced by activateUsersObject(), deactivateUsersObject(), deleteUsersObject(), freeAccessObject(), restrictAccessObject(), searchResultHandler(), and userActionObject().

688  {
689  global $ilTabs;
690 
691  $user_ids = $this->getActionUserIds();
692  if(!$user_ids)
693  {
694  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
695  }
696 
697  if(!$a_from_search)
698  {
699  $ilTabs->activateTab("obj_usrf");
700  }
701  else
702  {
703  $ilTabs->activateTab("search_user_extended");
704  }
705 
706  if (strcmp($action, "accessRestrict") == 0)
707  {
708  return $this->setAccessRestrictionObject(null, $a_from_search);
709  }
710  if (strcmp($action, "mail") == 0)
711  {
712  return $this->mailObject();
713  }
714 
715  unset($this->data);
716 
717  if(!$a_from_search)
718  {
719  $cancel = "cancelUserFolderAction";
720  }
721  else
722  {
723  $cancel = "cancelSearchAction";
724  }
725 
726  // display confirmation message
727  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
728  $cgui = new ilConfirmationGUI();
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);
733 
734  if($a_from_search)
735  {
736  $cgui->addHiddenItem("frsrch", 1);
737  }
738 
739  foreach($user_ids as $id)
740  {
741  $user = new ilObjUser($id);
742 
743  $login = $user->getLastLogin();
744  if(!$login)
745  {
746  $login = $this->lng->txt("never");
747  }
748  else
749  {
751  }
752 
753  $caption = $user->getFullname()." (".$user->getLogin().")".", ".
754  $user->getEmail()." - ".$this->lng->txt("last_login").": ".$login;
755 
756  $cgui->addItem("id[]", $id, $caption);
757  }
758 
759  $this->tpl->setContent($cgui->getHTML());
760 
761  return true;
762  }
const IL_CAL_DATETIME
getActionUserIds()
Get selected items for table action.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
setAccessRestrictionObject($a_form=null, $a_from_search=false)
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showActions()

ilObjUserFolderGUI::showActions (   $with_subobjects = false)

show possible action (form buttons)

Parameters
booleanpublic

Definition at line 277 of file class.ilObjUserFolderGUI.php.

References $_POST, ilObjectGUI\$actions, $d, $row, ilUtil\getImagePath(), and showPossibleSubObjects().

278  {
279  global $rbacsystem;
280 
281  $operations = array();
282 //var_dump($this->actions);
283  if ($this->actions == "")
284  {
285  $d = array(
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")
292  );
293  }
294  else
295  {
296  $d = $this->actions;
297  }
298  foreach ($d as $row)
299  {
300  if ($rbacsystem->checkAccess($row["name"],$this->object->getRefId()))
301  {
302  $operations[] = $row;
303  }
304  }
305 
306  if (count($operations) > 0)
307  {
308  $select = "<select name=\"selectedAction\">\n";
309  foreach ($operations as $val)
310  {
311  $select .= "<option value=\"" . $val["name"] . "\"";
312  if (strcmp($_POST["selectedAction"], $val["name"]) == 0)
313  {
314  $select .= " selected=\"selected\"";
315  }
316  $select .= ">";
317  $select .= $this->lng->txt($val["lng"]);
318  $select .= "</option>";
319  }
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();
326  }
327 
328  if ($with_subobjects === true)
329  {
330  $subobjs = $this->showPossibleSubObjects();
331  }
332 
333  if ((count($operations) > 0) or $subobjs === true)
334  {
335  $this->tpl->setCurrentBlock("tbl_action_row");
336  $this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
337  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
338  $this->tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
339  $this->tpl->parseCurrentBlock();
340  }
341  }
$_POST['username']
Definition: cron.php:12
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
+ Here is the call graph for this function:

◆ showLoginnameSettingsObject()

ilObjUserFolderGUI::showLoginnameSettingsObject ( )

Definition at line 2848 of file class.ilObjUserFolderGUI.php.

References $ilSetting, and initLoginSettingsForm().

2849  {
2850  global $ilSetting;
2851 
2852  $show_blocking_time_in_days = (int)$ilSetting->get('loginname_change_blocking_time') / 86400;
2853 
2854  $this->initLoginSettingsForm();
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
2860  ));
2861 
2862  $this->tpl->setVariable('ADM_CONTENT', $this->loginSettingsForm->getHTML());
2863  }
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ showPossibleSubObjects()

ilObjUserFolderGUI::showPossibleSubObjects ( )

show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders

public

Definition at line 349 of file class.ilObjUserFolderGUI.php.

References $d, $row, and ilUtil\formSelect().

Referenced by showActions().

350  {
351  global $rbacsystem;
352 
353  $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
354 
355  if (!$rbacsystem->checkAccess('create_usr',$this->object->getRefId()))
356  {
357  unset($d["usr"]);
358  }
359 
360  if (count($d) > 0)
361  {
362  foreach ($d as $row)
363  {
364  $count = 0;
365  if ($row["max"] > 0)
366  {
367  //how many elements are present?
368  for ($i=0; $i<count($this->data["ctrl"]); $i++)
369  {
370  if ($this->data["ctrl"][$i]["type"] == $row["name"])
371  {
372  $count++;
373  }
374  }
375  }
376  if ($row["max"] == "" || $count < $row["max"])
377  {
378  $subobj[] = $row["name"];
379  }
380  }
381  }
382 
383  if (is_array($subobj))
384  {
385  //build form
386  $opts = ilUtil::formSelect(12,"new_type",$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();
392 
393  return true;
394  }
395 
396  return false;
397  }
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAppliedUsersObject()

ilObjUserFolderGUI::updateAppliedUsersObject ( )

Definition at line 1543 of file class.ilObjUserFolderGUI.php.

References $_POST, $_SESSION, __toUnix(), appliedUsersObject(), editAppliedUsersObject(), ilObjectFactory\getInstanceByObjId(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

1544  {
1545  global $rbacsystem;
1546 
1547  if(!$rbacsystem->checkAccess("write", $this->ref_id))
1548  {
1549  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
1550  }
1551 
1552  $start = $this->__toUnix($_POST['au']['time_limit_start']);
1553  $end = $this->__toUnix($_POST['au']['time_limit_end']);
1554 
1555  if(!$_POST['au']['time_limit_unlimited'])
1556  {
1557  if($start > $end)
1558  {
1559  $_SESSION['error_post_vars'] = $_POST;
1560  ilUtil::sendFailure($this->lng->txt('time_limit_not_valid'));
1561  $this->editAppliedUsersObject();
1562 
1563  return false;
1564  }
1565  }
1566  #if(!$this->ilias->account->getTimeLimitUnlimited())
1567  #{
1568  # if($start < $this->ilias->account->getTimeLimitFrom() or
1569  # $end > $this->ilias->account->getTimeLimitUntil())
1570  # {
1571  # $_SESSION['error_post_vars'] = $_POST;
1572  # ilUtil::sendInfo($this->lng->txt('time_limit_not_within_owners'));
1573  # $this->editAppliedUsersObject();
1574 
1575  # return false;
1576  # }
1577  #}
1578 
1579  foreach($_SESSION['applied_users'] as $usr_id)
1580  {
1581  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1582 
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();
1588 
1589  unset($tmp_user);
1590  }
1591 
1592  unset($_SESSION['applied_users']);
1593  ilUtil::sendSuccess($this->lng->txt('time_limit_users_updated'));
1594  $this->appliedUsersObject();
1595 
1596  return true;
1597  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ userActionObject()

ilObjUserFolderGUI::userActionObject ( )

Definition at line 809 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

810  {
811  $this->showActionConfirmation($_POST["selectedAction"]);
812  }
$_POST['username']
Definition: cron.php:12
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ usrExportCsvObject()

ilObjUserFolderGUI::usrExportCsvObject ( )

Definition at line 3071 of file class.ilObjUserFolderGUI.php.

References getActionUserIds(), ilUtil\sendFailure(), and ilObjectGUI\viewObject().

3072  {
3073  $user_ids = $this->getActionUserIds();
3074  if(!$user_ids)
3075  {
3076  ilUtil::sendFailure($this->lng->txt('select_one'));
3077  return $this->viewObject();
3078  }
3079  $this->object->buildExportFile("userfolder_export_csv", $user_ids);
3080  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3081  }
viewObject()
list childs of current object
getActionUserIds()
Get selected items for table action.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ usrExportX86Object()

ilObjUserFolderGUI::usrExportX86Object ( )

Definition at line 3059 of file class.ilObjUserFolderGUI.php.

References getActionUserIds(), ilUtil\sendFailure(), and ilObjectGUI\viewObject().

3060  {
3061  $user_ids = $this->getActionUserIds();
3062  if(!$user_ids)
3063  {
3064  ilUtil::sendFailure($this->lng->txt('select_one'));
3065  return $this->viewObject();
3066  }
3067  $this->object->buildExportFile("userfolder_export_excel_x86", $user_ids);
3068  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3069  }
viewObject()
list childs of current object
getActionUserIds()
Get selected items for table action.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ usrExportXmlObject()

ilObjUserFolderGUI::usrExportXmlObject ( )

Definition at line 3083 of file class.ilObjUserFolderGUI.php.

References getActionUserIds(), ilUtil\sendFailure(), and ilObjectGUI\viewObject().

3084  {
3085  $user_ids = $this->getActionUserIds();
3086  if(!$user_ids)
3087  {
3088  ilUtil::sendFailure($this->lng->txt('select_one'));
3089  return $this->viewObject();
3090  }
3091  $this->object->buildExportFile("userfolder_export_xml", $user_ids);
3092  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3093  }
viewObject()
list childs of current object
getActionUserIds()
Get selected items for table action.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ viewObject()

ilObjUserFolderGUI::viewObject (   $reset_filter = FALSE)

list users

public

Definition at line 190 of file class.ilObjUserFolderGUI.php.

References $_GET, $ilSetting, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjUser\getFirstLettersOfLastnames(), ilLinkButton\getInstance(), and ilUserAccountSettings\getInstance().

191  {
192  global $rbacsystem, $ilUser, $ilToolbar, $tpl, $ilSetting, $lng;
193 
194  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
195 
196  if ($rbacsystem->checkAccess('create_usr', $this->object->getRefId()) ||
197  $rbacsystem->checkAccess('cat_administrate_users', $this->object->getRefId()))
198  {
199  $button = ilLinkButton::getInstance();
200  $button->setCaption("usr_add");
201  $button->setUrl($this->ctrl->getLinkTarget($this, "addUser"));
202  $ilToolbar->addButtonInstance($button);
203 
204  $button = ilLinkButton::getInstance();
205  $button->setCaption("import_users");
206  $button->setUrl($this->ctrl->getLinkTarget($this, "importUserForm"));
207  $ilToolbar->addButtonInstance($button);
208  }
209 
210  // alphabetical navigation
211  include_once './Services/User/classes/class.ilUserAccountSettings.php';
213  if ((int) $ilSetting->get('user_adm_alpha_nav'))
214  {
215  $ilToolbar->addSeparator();
216 
217  // alphabetical navigation
218  include_once("./Services/Form/classes/class.ilAlphabetInputGUI.php");
219  $ai = new ilAlphabetInputGUI("", "first");
220  include_once("./Services/User/classes/class.ilObjUser.php");
221  $ai->setLetters(ilObjUser::getFirstLettersOfLastnames());
222  /*$ai->setLetters(array("A","B","C","D","E","F","G","H","I","J",
223  "K","L","M","N","O","P","Q","R","S","T",
224  "U","V","W","X","Y","Z","1","2","3","4","_",
225  "Ä","Ü","Ö",":",";","+","*","#","§","%","&"));*/
226  $ai->setParentCommand($this, "chooseLetter");
227  $ai->setHighlighted($_GET["letter"]);
228  $ilToolbar->addInputItem($ai, true);
229 
230  }
231 
232  include_once("./Services/User/classes/class.ilUserTableGUI.php");
233  $utab = new ilUserTableGUI($this, "view");
234  $tpl->setContent($utab->getHTML());
235  }
$_GET["client_id"]
This class represents a text property in a property form.
TableGUI class for user administration.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static getInstance()
Singelton get instance.
static getFirstLettersOfLastnames()
Get first letters of all lastnames.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjUserFolderGUI::$ctrl

Definition at line 21 of file class.ilObjUserFolderGUI.php.


The documentation for this class was generated from the following file: