ILIAS  release_4-4 Revision
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 ()
 
 _goto ($a_user)
 goto target group More...
 
 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...
 

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...
 
 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 ()
 

Additional Inherited Members

- 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...
 

Detailed Description

Member Function Documentation

◆ __buildUserFilterSelect()

ilObjUserFolderGUI::__buildUserFilterSelect ( )

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

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

References $_SESSION, and ilUtil\formSelect().

2367  {
2368  $action[-1] = $this->lng->txt('all_users');
2369  $action[1] = $this->lng->txt('usr_active_only');
2370  $action[0] = $this->lng->txt('usr_inactive_only');
2371  $action[2] = $this->lng->txt('usr_limited_access_only');
2372  $action[3] = $this->lng->txt('usr_without_courses');
2373  $action[4] = $this->lng->txt('usr_filter_lastlogin');
2374  $action[5] = $this->lng->txt("usr_filter_coursemember");
2375  $action[6] = $this->lng->txt("usr_filter_groupmember");
2376  $action[7] = $this->lng->txt("usr_filter_role");
2377 
2378  return ilUtil::formSelect($_SESSION['user_filter'],"user_filter",$action,false,true);
2379  }
< 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 1651 of file class.ilObjUserFolderGUI.php.

References ilUtil\formSelect().

Referenced by editAppliedUsersObject().

1652  {
1653  switch($a_type)
1654  {
1655  case "minute":
1656  for($i=0;$i<=60;$i++)
1657  {
1658  $days[$i] = $i < 10 ? "0".$i : $i;
1659  }
1660  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1661 
1662  case "hour":
1663  for($i=0;$i<24;$i++)
1664  {
1665  $days[$i] = $i < 10 ? "0".$i : $i;
1666  }
1667  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1668 
1669  case "day":
1670  for($i=1;$i<32;$i++)
1671  {
1672  $days[$i] = $i < 10 ? "0".$i : $i;
1673  }
1674  return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
1675 
1676  case "month":
1677  for($i=1;$i<13;$i++)
1678  {
1679  $month[$i] = $i < 10 ? "0".$i : $i;
1680  }
1681  return ilUtil::formSelect($a_selected,$a_varname,$month,false,true);
1682 
1683  case "year":
1684  for($i = date("Y",time());$i < date("Y",time()) + 3;++$i)
1685  {
1686  $year[$i] = $i;
1687  }
1688  return ilUtil::formSelect($a_selected,$a_varname,$year,false,true);
1689  }
1690  }
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 1628 of file class.ilObjUserFolderGUI.php.

Referenced by __showAppliedUsersTable().

1629  {
1630  include_once "./Services/Table/classes/class.ilTableGUI.php";
1631 
1632  return new ilTableGUI(0,false);
1633  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

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

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

References $_GET.

Referenced by __showAppliedUsersTable().

1636  {
1637  $offset = $_GET["offset"];
1638  $order = $_GET["sort_by"];
1639  $direction = $_GET["sort_order"];
1640 
1641  //$tbl->enable("hits");
1642  $tbl->setOrderColumn($order);
1643  $tbl->setOrderDirection($direction);
1644  $tbl->setOffset($offset);
1645  $tbl->setLimit($_GET["limit"]);
1646  $tbl->setMaxCount(count($result_set));
1647  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1648  $tbl->setData($result_set);
1649  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ __showAppliedUsersTable()

ilObjUserFolderGUI::__showAppliedUsersTable (   $a_result_set)

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

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

Referenced by appliedUsersObject().

1581  {
1582  $tbl =& $this->__initTableGUI();
1583  $tpl =& $tbl->getTemplateObject();
1584 
1585  // SET FORMAACTION
1586  $tpl->setCurrentBlock("tbl_form_header");
1587 
1588  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1589  $tpl->parseCurrentBlock();
1590 
1591  $tpl->setCurrentBlock("tbl_action_btn");
1592  $tpl->setVariable("BTN_NAME",'editAppliedUsers');
1593  $tpl->setVariable("BTN_VALUE",$this->lng->txt('edit'));
1594  $tpl->parseCurrentBlock();
1595 
1596  $tpl->setCurrentBlock("tbl_action_row");
1597  $tpl->setVariable("COLUMN_COUNTS",5);
1598  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
1599  $tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
1600  $tpl->parseCurrentBlock();
1601 
1602 
1603 
1604  $tbl->setTitle($this->lng->txt("time_limit_applied_users"),"icon_usr_b.png",$this->lng->txt("users"));
1605  $tbl->setHeaderNames(array('',
1606  $this->lng->txt("login"),
1607  $this->lng->txt("firstname"),
1608  $this->lng->txt("lastname"),
1609  $this->lng->txt("time_limits")));
1610  $header_params = $this->ctrl->getParameterArray($this, "appliedUsers");
1611  $tbl->setHeaderVars(array("",
1612  "login",
1613  "firstname",
1614  "lastname",
1615  "time_limit"),
1616  array($header_params));
1617  $tbl->setColumnWidth(array("3%","19%","19%","19%","40%"));
1618 
1619 
1620  $this->__setTableGUIBasicData($tbl,$a_result_set);
1621  $tbl->render();
1622 
1623  $this->tpl->setVariable("APPLIED_USERS",$tbl->tpl->get());
1624 
1625  return true;
1626  }
__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 1691 of file class.ilObjUserFolderGUI.php.

Referenced by editAppliedUsersObject(), and updateAppliedUsersObject().

1692  {
1693  return mktime($a_time_arr["hour"],
1694  $a_time_arr["minute"],
1695  $a_time_arr["second"],
1696  $a_time_arr["month"],
1697  $a_time_arr["day"],
1698  $a_time_arr["year"]);
1699  }
+ Here is the caller graph for this function:

◆ _goto()

ilObjUserFolderGUI::_goto (   $a_user)

goto target group

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

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

2927  {
2928  global $ilAccess, $ilErr, $lng;
2929 
2930  $a_target = USER_FOLDER_ID;
2931 
2932  if ($ilAccess->checkAccess("read", "", $a_target))
2933  {
2934  ilUtil::redirect("ilias.php?baseClass=ilAdministrationGUI&ref_id=".$a_target."&jmpToUser=".$a_user);
2935  exit;
2936  }
2937  else
2938  {
2939  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
2940  {
2941  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
2942  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
2944  }
2945  }
2946  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2947  }
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 759 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

760  {
761  $_POST["selectedAction"] = "activate";
762  $this->showActionConfirmation($_POST["selectedAction"]);
763  }
$_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 3139 of file class.ilObjUserFolderGUI.php.

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

3140  {
3141  switch($a_form_id)
3142  {
3144 
3145  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
3146  $security = ilSecuritySettings::_getInstance();
3147 
3148  $fields = array();
3149 
3150  $subitems = array(
3151  'ps_password_change_on_first_login_enabled' => array($security->isPasswordChangeOnFirstLoginEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3152  'ps_password_must_not_contain_loginame' => array((bool)$security->getPasswordMustNotContainLoginnameStatus(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3153  'ps_password_chars_and_numbers_enabled' => array($security->isPasswordCharsAndNumbersEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3154  'ps_password_special_chars_enabled' => array($security->isPasswordSpecialCharsEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
3155  'ps_password_min_length' => (int)$security->getPasswordMinLength(),
3156  'ps_password_max_length' => (int)$security->getPasswordMaxLength(),
3157  'ps_password_uppercase_chars_num' => (int)$security->getPasswordNumberOfUppercaseChars(),
3158  'ps_password_lowercase_chars_num' => (int)$security->getPasswordNumberOfLowercaseChars(),
3159  'ps_password_max_age' => (int)$security->getPasswordMaxAge()
3160  );
3161  $fields['ps_password_settings'] = array(null, null, $subitems);
3162 
3163  $subitems = array(
3164  'ps_login_max_attempts' => (int)$security->getLoginMaxAttempts(),
3165  'ps_prevent_simultaneous_logins' => array($security->isPreventionOfSimultaneousLoginsEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
3166  );
3167  $fields['ps_security_protection'] = array(null, null, $subitems);
3168 
3169  return array(array("generalSettings", $fields));
3170  }
3171  }
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 228 of file class.ilObjUserFolderGUI.php.

References $_REQUEST, and exit.

229  {
230  include_once './Services/User/classes/class.ilUserAutoComplete.php';
231  $auto = new ilUserAutoComplete();
232  $auto->setSearchFields(array('login','firstname','lastname','email'));
233  $auto->enableFieldSearchableCheck(false);
234  echo $auto->getList($_REQUEST['term']);
235  exit();
236  }
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 160 of file class.ilObjUserFolderGUI.php.

References $ilCtrl.

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

◆ appliedUsersObject()

ilObjUserFolderGUI::appliedUsersObject ( )

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

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

Referenced by editAppliedUsersObject(), and updateAppliedUsersObject().

1369  {
1370  global $rbacsystem,$ilias;
1371 
1372  unset($_SESSION['applied_users']);
1373 
1374  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
1375  {
1376  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
1377  }
1378 
1379  if(!count($app_users =& $ilias->account->getAppliedUsers()))
1380  {
1381  ilUtil::sendFailure($this->lng->txt('no_users_applied'));
1382 
1383  return false;
1384  }
1385 
1386  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.usr_applied_users.html", "Services/User");
1387  $this->lng->loadLanguageModule('crs');
1388 
1389  $counter = 0;
1390  foreach($app_users as $usr_id)
1391  {
1392  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1393 
1394  $f_result[$counter][] = ilUtil::formCheckbox(0,"users[]",$usr_id);
1395  $f_result[$counter][] = $tmp_user->getLogin();
1396  $f_result[$counter][] = $tmp_user->getFirstname();
1397  $f_result[$counter][] = $tmp_user->getLastname();
1398 
1399  if($tmp_user->getTimeLimitUnlimited())
1400  {
1401  $f_result[$counter][] = "<b>".$this->lng->txt('crs_unlimited')."</b>";
1402  }
1403  else
1404  {
1405  $limit = "<b>".$this->lng->txt('crs_from').'</b> '.strftime("%Y-%m-%d %R",$tmp_user->getTimeLimitFrom()).'<br />';
1406  $limit .= "<b>".$this->lng->txt('crs_to').'</b> '.strftime("%Y-%m-%d %R",$tmp_user->getTimeLimitUntil());
1407 
1408  $f_result[$counter][] = $limit;
1409  }
1410  ++$counter;
1411  }
1412 
1413  $this->__showAppliedUsersTable($f_result);
1414 
1415  return true;
1416  }
< 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 172 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

173  {
174  global $ilTabs;
175 
176  include_once("./Services/User/classes/class.ilUserTableGUI.php");
177  $utab = new ilUserTableGUI($this, "view");
178  $utab->resetOffset();
179  $utab->writeFilterToSession();
180  $this->viewObject();
181  $ilTabs->activateTab("usrf");
182  }
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 2439 of file class.ilObjUserFolderGUI.php.

2440  {
2441  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2442  }

◆ cancelNewAccountMailObject()

ilObjUserFolderGUI::cancelNewAccountMailObject ( )

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

2712  {
2713  $this->ctrl->redirect($this, "settings");
2714  }

◆ cancelSearchActionObject()

ilObjUserFolderGUI::cancelSearchActionObject ( )

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

386  {
387  $this->ctrl->redirectByClass('ilrepositorysearchgui', 'showSearchResults');
388  }

◆ cancelUserFolderActionObject()

ilObjUserFolderGUI::cancelUserFolderActionObject ( )

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

381  {
382  $this->ctrl->redirect($this, 'view');
383  }

◆ chooseLetterObject()

ilObjUserFolderGUI::chooseLetterObject ( )

Choose first letter.

Parameters

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

References $ilCtrl.

245  {
246  global $ilCtrl;
247 
248  $ilCtrl->redirect($this, "view");
249  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmaccessFreeObject()

ilObjUserFolderGUI::confirmaccessFreeObject ( )

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

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

464  {
465  global $rbacsystem, $ilUser;
466 
467  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
468  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
469  {
470  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
471  }
472 
473  // FOR ALL SELECTED OBJECTS
474  foreach ($_POST["id"] as $id)
475  {
476  // instatiate correct object class (usr)
477  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
478  $obj->setTimeLimitOwner($ilUser->getId());
479  $obj->setTimeLimitUnlimited(1);
480  $obj->setTimeLimitFrom("");
481  $obj->setTimeLimitUntil("");
482  $obj->setTimeLimitMessage(0);
483  $obj->update();
484  }
485 
486  // Feedback
487  ilUtil::sendSuccess($this->lng->txt("access_free_granted"),true);
488 
489  if ($_POST["frsrch"])
490  {
491  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
492  }
493  else
494  {
495  $this->ctrl->redirect($this, "view");
496  }
497  }
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 556 of file class.ilObjUserFolderGUI.php.

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

557  {
558  $form = $this->initAccessRestrictionForm();
559  if(!$form->checkInput())
560  {
561  return $this->setAccessRestrictionObject($form);
562  }
563 
564  $timefrom = $form->getItemByPostVar("from")->getDate()->get(IL_CAL_UNIX);
565  $timeuntil = $form->getItemByPostVar("to")->getDate()->get(IL_CAL_UNIX);
566  if ($timeuntil <= $timefrom)
567  {
568  ilUtil::sendFailure($this->lng->txt("time_limit_not_valid"));
569  return $this->setAccessRestrictionObject($form);
570  }
571 
572  global $rbacsystem, $ilUser;
573 
574  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
575  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
576  {
577  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
578  }
579 
580  // FOR ALL SELECTED OBJECTS
581  foreach ($_POST["id"] as $id)
582  {
583  // instatiate correct object class (usr)
584  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
585  $obj->setTimeLimitOwner($ilUser->getId());
586  $obj->setTimeLimitUnlimited(0);
587  $obj->setTimeLimitFrom($timefrom);
588  $obj->setTimeLimitUntil($timeuntil);
589  $obj->setTimeLimitMessage(0);
590  $obj->update();
591  }
592 
593  // Feedback
594  ilUtil::sendSuccess($this->lng->txt("access_restricted"),true);
595 
596  if ($_POST["frsrch"])
597  {
598  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
599  }
600  else
601  {
602  $this->ctrl->redirect($this, "view");
603  }
604  }
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 395 of file class.ilObjUserFolderGUI.php.

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

396  {
397  global $rbacsystem, $ilUser;
398 
399  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
400  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
401  {
402  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
403  }
404 
405  // FOR ALL SELECTED OBJECTS
406  foreach ($_POST["id"] as $id)
407  {
408  // instatiate correct object class (usr)
409  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
410  $obj->setActive(TRUE, $ilUser->getId());
411  $obj->update();
412  }
413 
414  ilUtil::sendSuccess($this->lng->txt("user_activated"),true);
415 
416  if ($_POST["frsrch"])
417  {
418  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
419  }
420  else
421  {
422  $this->ctrl->redirect($this, "view");
423  }
424  }
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 431 of file class.ilObjUserFolderGUI.php.

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

432  {
433  global $rbacsystem, $ilUser;
434 
435  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
436  if (!$rbacsystem->checkAccess('write',$this->object->getRefId()))
437  {
438  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING);
439  }
440 
441  // FOR ALL SELECTED OBJECTS
442  foreach ($_POST["id"] as $id)
443  {
444  // instatiate correct object class (usr)
445  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
446  $obj->setActive(FALSE, $ilUser->getId());
447  $obj->update();
448  }
449 
450  // Feedback
451  ilUtil::sendSuccess($this->lng->txt("user_deactivated"),true);
452 
453  if ($_POST["frsrch"])
454  {
455  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
456  }
457  else
458  {
459  $this->ctrl->redirect($this, "view");
460  }
461  }
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 2408 of file class.ilObjUserFolderGUI.php.

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

2409  {
2410  if(!isset($_POST["file"]))
2411  {
2412  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2413  }
2414 
2415  // display confirmation message
2416  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2417  $cgui = new ilConfirmationGUI();
2418  $cgui->setFormAction($this->ctrl->getFormAction($this));
2419  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
2420  $cgui->setCancel($this->lng->txt("cancel"), "cancelDeleteExportFile");
2421  $cgui->setConfirm($this->lng->txt("confirm"), "deleteExportFile");
2422 
2423  // BEGIN TABLE DATA
2424  $counter = 0;
2425  foreach($_POST["file"] as $file)
2426  {
2427  $caption = ilUtil::getImageTagByType("usrf", $this->tpl->tplPath).
2428  " ".$file;
2429  $cgui->addItem("file[]", $file, $caption);
2430  }
2431 
2432  $this->tpl->setContent($cgui->getHTML());
2433  }
print $file
$_POST['username']
Definition: cron.php:12
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
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 611 of file class.ilObjUserFolderGUI.php.

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

612  {
613  global $rbacsystem, $ilCtrl, $ilUser;
614 
615  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
616  if (!$rbacsystem->checkAccess('delete',$this->object->getRefId()))
617  {
618  ilUtil::sendFailure($this->lng->txt("msg_no_perm_delete"), true);
619  $ilCtrl->redirect($this, "view");
620  }
621 
622  if (in_array($ilUser->getId(), $_POST["id"]))
623  {
624  $this->ilias->raiseError($this->lng->txt("msg_no_delete_yourself"),$this->ilias->error_obj->WARNING);
625  }
626 
627  // FOR ALL SELECTED OBJECTS
628  foreach ($_POST["id"] as $id)
629  {
630  // instatiate correct object class (usr)
631  $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
632  $obj->delete();
633  }
634 
635  // Feedback
636  ilUtil::sendSuccess($this->lng->txt("user_deleted"),true);
637 
638  if ($_POST["frsrch"])
639  {
640  $this->ctrl->redirectByClass('ilRepositorySearchGUI','show');
641  }
642  else
643  {
644  $this->ctrl->redirect($this, "view");
645  }
646  }
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 2167 of file class.ilObjUserFolderGUI.php.

References saveGlobalUserSettingsObject().

2168  {
2169  $this->saveGlobalUserSettingsObject("save");
2170  }
+ Here is the call graph for this function:

◆ deactivateUsersObject()

ilObjUserFolderGUI::deactivateUsersObject ( )

Deactivate users.

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

References $_POST, and showActionConfirmation().

769  {
770  $_POST["selectedAction"] = "deactivate";
771  $this->showActionConfirmation($_POST["selectedAction"]);
772  }
$_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 2448 of file class.ilObjUserFolderGUI.php.

References $_POST, and $file.

2449  {
2450  $export_dir = $this->object->getExportDirectory();
2451  foreach($_POST["file"] as $file)
2452  {
2453  $file = basename($file);
2454 
2455  $exp_file = $export_dir."/".$file;
2456  if (@is_file($exp_file))
2457  {
2458  unlink($exp_file);
2459  }
2460  }
2461  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2462  }
print $file
$_POST['username']
Definition: cron.php:12

◆ deleteUsersObject()

ilObjUserFolderGUI::deleteUsersObject ( )

Delete users.

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

References $_POST, and showActionConfirmation().

751  {
752  $_POST["selectedAction"] = "delete";
753  $this->showActionConfirmation($_POST["selectedAction"]);
754  }
$_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 2387 of file class.ilObjUserFolderGUI.php.

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

2388  {
2389  if(!isset($_POST["file"]))
2390  {
2391  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2392  }
2393 
2394  if (count($_POST["file"]) > 1)
2395  {
2396  $this->ilias->raiseError($this->lng->txt("select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2397  }
2398 
2399  $file = basename($_POST["file"][0]);
2400 
2401  $export_dir = $this->object->getExportDirectory();
2402  ilUtil::deliverFile($export_dir."/".$file, $file);
2403  }
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 1418 of file class.ilObjUserFolderGUI.php.

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

Referenced by updateAppliedUsersObject().

1419  {
1420  global $rbacsystem;
1421 
1422  if(!$rbacsystem->checkAccess("write", $this->ref_id))
1423  {
1424  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
1425  }
1426 
1427  $this->lng->loadLanguageModule('crs');
1428 
1429  $_POST['users'] = $_SESSION['applied_users'] = ($_SESSION['applied_users'] ? $_SESSION['applied_users'] : $_POST['users']);
1430 
1431  if(!isset($_SESSION['error_post_vars']))
1432  {
1433  ilUtil::sendInfo($this->lng->txt('time_limit_add_time_limit_for_selected'));
1434  }
1435 
1436  if(!count($_POST["users"]))
1437  {
1438  ilUtil::sendFailure($this->lng->txt("time_limit_no_users_selected"));
1439  $this->appliedUsersObject();
1440 
1441  return false;
1442  }
1443 
1444  $counter = 0;
1445  foreach($_POST['users'] as $usr_id)
1446  {
1447  if($counter)
1448  {
1449  $title .= ', ';
1450  }
1451  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1452  $title .= $tmp_user->getLogin();
1453  ++$counter;
1454  }
1455  if(strlen($title) > 79)
1456  {
1457  $title = substr($title,0,80);
1458  $title .= '...';
1459  }
1460 
1461 
1462  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.usr_edit_applied_users.html", "Services/User");
1463  $this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1464 
1465  // LOAD SAVED DATA IN CASE OF ERROR
1466  $time_limit_unlimited = $_SESSION["error_post_vars"]["au"]["time_limit_unlimited"] ?
1467  1 : 0;
1468 
1469  $time_limit_start = $_SESSION["error_post_vars"]["au"]["time_limit_start"] ?
1470  $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_start"]) :
1471  time();
1472  $time_limit_end = $_SESSION["error_post_vars"]["au"]["time_limit_end"] ?
1473  $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_end"]) :
1474  time();
1475 
1476 
1477  // SET TEXT VARIABLES
1478  $this->tpl->setVariable("ALT_IMG",$this->lng->txt("obj_usr"));
1479  $this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath("icon_usr_b.png"));
1480  $this->tpl->setVariable("TITLE",$title);
1481  $this->tpl->setVariable("TXT_TIME_LIMIT",$this->lng->txt("time_limit"));
1482  $this->tpl->setVariable("TXT_TIME_LIMIT_START",$this->lng->txt("crs_start"));
1483  $this->tpl->setVariable("TXT_TIME_LIMIT_END",$this->lng->txt("crs_end"));
1484  $this->tpl->setVariable("CMD_SUBMIT","updateAppliedUsers");
1485  $this->tpl->setVariable("TXT_CANCEL",$this->lng->txt("cancel"));
1486  $this->tpl->setVariable("TXT_SUBMIT",$this->lng->txt("submit"));
1487 
1488 
1489 
1490  $this->tpl->setVariable("SELECT_TIME_LIMIT_START_DAY",$this->__getDateSelect("day","au[time_limit_start][day]",
1491  date("d",$time_limit_start)));
1492  $this->tpl->setVariable("SELECT_TIME_LIMIT_START_MONTH",$this->__getDateSelect("month","au[time_limit_start][month]",
1493  date("m",$time_limit_start)));
1494  $this->tpl->setVariable("SELECT_TIME_LIMIT_START_YEAR",$this->__getDateSelect("year","au[time_limit_start][year]",
1495  date("Y",$time_limit_start)));
1496  $this->tpl->setVariable("SELECT_TIME_LIMIT_START_HOUR",$this->__getDateSelect("hour","au[time_limit_start][hour]",
1497  date("G",$time_limit_start)));
1498  $this->tpl->setVariable("SELECT_TIME_LIMIT_START_MINUTE",$this->__getDateSelect("minute","au[time_limit_start][minute]",
1499  date("i",$time_limit_start)));
1500  $this->tpl->setVariable("SELECT_TIME_LIMIT_END_DAY",$this->__getDateSelect("day","au[time_limit_end][day]",
1501  date("d",$time_limit_end)));
1502  $this->tpl->setVariable("SELECT_TIME_LIMIT_END_MONTH",$this->__getDateSelect("month","au[time_limit_end][month]",
1503  date("m",$time_limit_end)));
1504  $this->tpl->setVariable("SELECT_TIME_LIMIT_END_YEAR",$this->__getDateSelect("year","au[time_limit_end][year]",
1505  date("Y",$time_limit_end)));
1506  $this->tpl->setVariable("SELECT_TIME_LIMIT_END_HOUR",$this->__getDateSelect("hour","au[time_limit_end][hour]",
1507  date("G",$time_limit_end)));
1508  $this->tpl->setVariable("SELECT_TIME_LIMIT_END_MINUTE",$this->__getDateSelect("minute","au[time_limit_end][minute]",
1509  date("i",$time_limit_end)));
1510  if($this->ilias->account->getTimeLimitUnlimited())
1511  {
1512  $this->tpl->setVariable("ROWSPAN",3);
1513  $this->tpl->setCurrentBlock("unlimited");
1514  $this->tpl->setVariable("TXT_TIME_LIMIT_UNLIMITED",$this->lng->txt("crs_unlimited"));
1515  $this->tpl->setVariable("TIME_LIMIT_UNLIMITED",ilUtil::formCheckbox($time_limit_unlimited,"au[time_limit_unlimited]",1));
1516  $this->tpl->parseCurrentBlock();
1517  }
1518  else
1519  {
1520  $this->tpl->setVariable("ROWSPAN",2);
1521  }
1522  }
< 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']
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__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->enableSearchableCheck(false);
80  $user_search->setCallback(
81  $this,
82  'searchResultHandler',
83  $this->getUserMultiCommands(true)
84  );
85  $this->tabs_gui->setTabActive('search_user_extended');
86  $this->ctrl->setReturn($this,'view');
87  $ret =& $this->ctrl->forwardCommand($user_search);
88  break;
89 
90  case 'ilaccountcodesgui':
91  $this->tabs_gui->setTabActive('settings');
92  $this->setSubTabs("settings");
93  $ilTabs->activateSubTab("account_codes");
94  include_once("./Services/User/classes/class.ilAccountCodesGUI.php");
95  $acc = new ilAccountCodesGUI($this->ref_id);
96  $this->ctrl->forwardCommand($acc);
97  break;
98 
99  case 'ilcustomuserfieldsgui':
100  $this->tabs_gui->setTabActive('settings');
101  $this->setSubTabs("settings");
102  $ilTabs->activateSubTab("user_defined_fields");
103  include_once("./Services/User/classes/class.ilCustomUserFieldsGUI.php");
104  $cf = new ilCustomUserFieldsGUI();
105  $this->ctrl->forwardCommand($cf);
106  break;
107 
108  default:
109  if(!$cmd)
110  {
111  $cmd = "view";
112  }
113  $cmd .= "Object";
114 
115  $this->$cmd();
116 
117  break;
118  }
119  return true;
120  }
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 2474 of file class.ilObjUserFolderGUI.php.

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

2475  {
2476  global $ilias, $ilCtrl;
2477 
2478  if ($_POST["cmd"]["export"])
2479  {
2480  $this->object->buildExportFile($_POST["export_type"]);
2481  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
2482  exit;
2483  }
2484 
2485  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.usr_export.html','Services/User');
2486 
2487  $export_types = array(
2488  "userfolder_export_excel_x86",
2489  "userfolder_export_csv",
2490  "userfolder_export_xml"
2491  );
2492 
2493  // create table
2494  include_once("./Services/Table/classes/class.ilTableGUI.php");
2495  $tbl = new ilTableGUI();
2496 
2497  // load files templates
2498  $this->tpl->addBlockfile("EXPORT_FILES", "export_files", "tpl.table.html");
2499 
2500  // load template for table content data
2501  $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.usr_export_file_row.html", "Services/User");
2502 
2503  $num = 0;
2504 
2505  $tbl->setTitle($this->lng->txt("userfolder_export_files"));
2506 
2507  $tbl->setHeaderNames(array("", $this->lng->txt("userfolder_export_file"),
2508  $this->lng->txt("userfolder_export_file_size"), $this->lng->txt("date") ));
2509  $tbl->setHeaderVars(array(), $ilCtrl->getParameterArray($this, "export"));
2510 
2511  $tbl->enabled["sort"] = false;
2512  $tbl->setColumnWidth(array("1%", "49%", "25%", "25%"));
2513 
2514  // control
2515  $tbl->setOrderColumn($_GET["sort_by"]);
2516  $tbl->setOrderDirection($_GET["sort_order"]);
2517  $tbl->setLimit($_GET["limit"]);
2518  $tbl->setOffset($_GET["offset"]);
2519  $tbl->setMaxCount($this->maxcount); // ???
2520 
2521 
2522  $this->tpl->setVariable("COLUMN_COUNTS", 4);
2523 
2524  // delete button
2525  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
2526  $this->tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
2527  $this->tpl->setCurrentBlock("tbl_action_btn");
2528  $this->tpl->setVariable("BTN_NAME", "confirmDeleteExportFile");
2529  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
2530  $this->tpl->parseCurrentBlock();
2531 
2532  $this->tpl->setCurrentBlock("tbl_action_btn");
2533  $this->tpl->setVariable("BTN_NAME", "downloadExportFile");
2534  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
2535  $this->tpl->parseCurrentBlock();
2536 
2537  // footer
2538  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
2539  //$tbl->disable("footer");
2540 
2541  $export_files = $this->object->getExportFiles();
2542 
2543  $tbl->setMaxCount(count($export_files));
2544  $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
2545 
2546  $tbl->render();
2547 
2548  if(count($export_files) > 0)
2549  {
2550  $i=0;
2551  foreach($export_files as $exp_file)
2552  {
2553  $this->tpl->setCurrentBlock("tbl_content");
2554  $this->tpl->setVariable("TXT_FILENAME", $exp_file["filename"]);
2555 
2556  $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
2557  $this->tpl->setVariable("CSS_ROW", $css_row);
2558 
2559  $this->tpl->setVariable("TXT_SIZE", $exp_file["filesize"]);
2560  $this->tpl->setVariable("CHECKBOX_ID", $exp_file["filename"]);
2561 
2562  $file_arr = explode("__", $exp_file["filename"]);
2563  $this->tpl->setVariable('TXT_DATE',ilDatePresentation::formatDate(new ilDateTime($file_arr[0],IL_CAL_UNIX)));
2564 
2565  $this->tpl->parseCurrentBlock();
2566  }
2567 
2568  $this->tpl->setCurrentBlock("selectall");
2569  $this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
2570  $this->tpl->setVariable("CSS_ROW", $css_row);
2571  $this->tpl->parseCurrentBlock();
2572  } //if is_array
2573  /*
2574  else
2575 
2576  {
2577  $this->tpl->setCurrentBlock("notfound");
2578  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
2579  $this->tpl->setVariable("NUM_COLS", 3);
2580  $this->tpl->parseCurrentBlock();
2581  }
2582  */
2583 
2584  $this->tpl->parseCurrentBlock();
2585 
2586 
2587  foreach ($export_types as $export_type)
2588  {
2589  $this->tpl->setCurrentBlock("option");
2590  $this->tpl->setVariable("OPTION_VALUE", $export_type);
2591  $this->tpl->setVariable("OPTION_TEXT", $this->lng->txt($export_type));
2592  $this->tpl->parseCurrentBlock();
2593  }
2594 
2595  $this->tpl->setVariable("EXPORT_BUTTON", $this->lng->txt("create_export_file"));
2596  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2597  }
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 786 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

787  {
788  $_POST["selectedAction"] = "accessFree";
789  $this->showActionConfirmation($_POST["selectedAction"]);
790  }
$_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 1711 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.

1712  {
1713  global $ilSetting;
1714 
1715  $this->initFormGeneralSettings();
1716 
1717  include_once './Services/User/classes/class.ilUserAccountSettings.php';
1719 
1720  $show_blocking_time_in_days = $ilSetting->get('loginname_change_blocking_time') / 86400;
1721  $show_blocking_time_in_days = (float)$show_blocking_time_in_days;
1722 
1723  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1724  $security = ilSecuritySettings::_getInstance();
1725 
1726  $this->form->setValuesByArray(
1727  array(
1728  'lua' => $aset->isLocalUserAdministrationEnabled(),
1729  'lrua' => $aset->isUserAccessRestricted(),
1730  'allow_change_loginname' => (bool)$ilSetting->get('allow_change_loginname'),
1731  'create_history_loginname' => (bool)$ilSetting->get('create_history_loginname'),
1732  'reuse_of_loginnames' => (bool)$ilSetting->get('reuse_of_loginnames'),
1733  'loginname_change_blocking_time' => (float)$show_blocking_time_in_days,
1734  'user_adm_alpha_nav' => (int)$ilSetting->get('user_adm_alpha_nav'),
1735  // 'user_ext_profiles' => (int)$ilSetting->get('user_ext_profiles')
1736  'user_reactivate_code' => (int)$ilSetting->get('user_reactivate_code'),
1737  'user_own_account' => (int)$ilSetting->get('user_delete_own_account'),
1738  'user_own_account_email' => $ilSetting->get('user_delete_own_account_email'),
1739 
1740  'session_handling_type' => $ilSetting->get('session_handling_type', ilSession::SESSION_HANDLING_FIXED),
1741  'session_reminder_enabled' => $ilSetting->get('session_reminder_enabled'),
1742  'session_max_count' => $ilSetting->get('session_max_count', ilSessionControl::DEFAULT_MAX_COUNT),
1743  'session_min_idle' => $ilSetting->get('session_min_idle', ilSessionControl::DEFAULT_MIN_IDLE),
1744  'session_max_idle' => $ilSetting->get('session_max_idle', ilSessionControl::DEFAULT_MAX_IDLE),
1745  'session_max_idle_after_first_request' => $ilSetting->get('session_max_idle_after_first_request', ilSessionControl::DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST),
1746 
1747  'passwd_auto_generate' => (bool)$ilSetting->get("passwd_auto_generate"),
1748  'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1749  'password_must_not_contain_loginame' => $security->getPasswordMustNotContainLoginnameStatus() ? 1 : 0,
1750  'password_chars_and_numbers_enabled' => $security->isPasswordCharsAndNumbersEnabled() ? 1 : 0,
1751  'password_special_chars_enabled' => $security->isPasswordSpecialCharsEnabled() ? 1 : 0 ,
1752  'password_min_length' => $security->getPasswordMinLength(),
1753  'password_max_length' => $security->getPasswordMaxLength(),
1754  'password_ucase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
1755  'password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
1756  'password_max_age' => $security->getPasswordMaxAge(),
1757 
1758  'login_max_attempts' => $security->getLoginMaxAttempts(),
1759  'ps_prevent_simultaneous_logins' => (int)$security->isPreventionOfSimultaneousLoginsEnabled(),
1760  'password_assistance' => (bool)$ilSetting->get("password_assistance")
1761  )
1762  );
1763 
1764  $this->tpl->setContent($this->form->getHTML());
1765  }
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 653 of file class.ilObjUserFolderGUI.php.

References $_POST, and ilUserTableGUI\MODE_USER_FOLDER.

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

654  {
655  if($_POST["select_cmd_all"])
656  {
657  include_once("./Services/User/classes/class.ilUserTableGUI.php");
658  $utab = new ilUserTableGUI($this, "view", ilUserTableGUI::MODE_USER_FOLDER, false);
659  return $utab->getUserIdsForFilter();
660  }
661  else
662  {
663  return $_POST["id"];
664  }
665  }
$_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 2747 of file class.ilObjUserFolderGUI.php.

References getTabs().

2748  {
2749  $this->getTabs($tabs_gui);
2750  }
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 875 of file class.ilObjUserFolderGUI.php.

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

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

876  {
877  // For each user session a different directory must be used to prevent
878  // that one user session overwrites the import data that another session
879  // is currently importing.
880  global $ilUser;
881  $importDir = ilUtil::getDataDir().'/user_import/usr_'.$ilUser->getId().'_'.session_id();
882  ilUtil::makeDirParents($importDir);
883  return $importDir;
884  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
global $ilUser
Definition: imgupload.php:15
static getDataDir()
get data directory (outside webspace)
+ 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 2757 of file class.ilObjUserFolderGUI.php.

Referenced by getAdminTabs().

2758  {
2759  include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
2760 
2761  global $rbacsystem;
2762 
2763  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
2764  {
2765  $tabs_gui->addTarget("usrf",
2766  $this->ctrl->getLinkTarget($this, "view"), array("view","delete","resetFilter", "userAction", ""), "", "");
2767 
2768  $tabs_gui->addTarget(
2769  "search_user_extended",
2770  $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI',''),
2771  array(),
2772  "ilrepositorysearchgui",
2773  ""
2774  );
2775  }
2776 
2777  if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
2778  {
2779  $tabs_gui->addTarget("settings",
2780  $this->ctrl->getLinkTarget($this, "generalSettings"),array('settings','generalSettings','listUserDefinedField','newAccountMail'));
2781 
2782  $tabs_gui->addTarget("export",
2783  $this->ctrl->getLinkTarget($this, "export"), "export", "", "");
2784 
2785  /* deprecated, JF 27 May 2013
2786  if(ilObjUserTracking::_enabledLearningProgress() &&
2787  ilObjUserTracking::_enabledUserRelatedData())
2788  {
2789  $tabs_gui->addTarget("learning_progress",
2790  $this->ctrl->getLinkTarget($this, "learningProgress"), "learningProgress", "", "");
2791  }
2792  */
2793  }
2794 
2795  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
2796  {
2797  $tabs_gui->addTarget("perm_settings",
2798  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
2799  array("perm","info","owner"), 'ilpermissiongui');
2800  }
2801  }
+ Here is the caller graph for this function:

◆ getUserMultiCommands()

ilObjUserFolderGUI::getUserMultiCommands (   $a_search_form = false)

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

References $cmd, and $ilUser.

Referenced by executeCommand().

2988  {
2989  global $rbacsystem, $ilUser;
2990 
2991  // see searchResultHandler()
2992  if($a_search_form)
2993  {
2994  $cmds = array(
2995  'activate' => $this->lng->txt('activate'),
2996  'deactivate' => $this->lng->txt('deactivate'),
2997  'accessRestrict' => $this->lng->txt('accessRestrict'),
2998  'accessFree' => $this->lng->txt('accessFree')
2999  );
3000 
3001  if ($rbacsystem->checkAccess('delete', $this->object->getRefId()))
3002  {
3003  $cmds["delete"] = $this->lng->txt("delete");
3004  }
3005  }
3006  // show confirmation
3007  else
3008  {
3009  $cmds = array(
3010  'activateUsers' => $this->lng->txt('activate'),
3011  'deactivateUsers' => $this->lng->txt('deactivate'),
3012  'restrictAccess' => $this->lng->txt('accessRestrict'),
3013  'freeAccess' => $this->lng->txt('accessFree')
3014  );
3015 
3016  if ($rbacsystem->checkAccess('delete', $this->object->getRefId()))
3017  {
3018  $cmds["deleteUsers"] = $this->lng->txt("delete");
3019  }
3020  }
3021 
3022  // no confirmation needed
3023  $export_types = array("userfolder_export_excel_x86", "userfolder_export_csv", "userfolder_export_xml");
3024  foreach ($export_types as $type)
3025  {
3026  $cmd = explode("_", $type);
3027  $cmd = array_pop($cmd);
3028  $cmds['usrExport'.ucfirst($cmd)] = $this->lng->txt('export').' - '.
3029  $this->lng->txt($type);
3030  }
3031 
3032  // check if current user may send mails
3033  include_once "Services/Mail/classes/class.ilMail.php";
3034  $mail = new ilMail($ilUser->getId());
3035  if($rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId()))
3036  {
3037  $cmds["mail"] = $this->lng->txt("send_mail");
3038  }
3039 
3040  return $cmds;
3041  }
$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 1701 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

1702  {
1703  parent::hitsperpageObject();
1704  $this->viewObject();
1705  }
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 852 of file class.ilObjUserFolderGUI.php.

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

853  {
854  // purge user import directory
855  $import_dir = $this->getImportDir();
856  if (@is_dir($import_dir))
857  {
858  ilUtil::delDir($import_dir);
859  }
860 
861  if (strtolower($_GET["baseClass"]) == 'iladministrationgui')
862  {
863  $this->ctrl->redirect($this, "view");
864  //ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location));
865  }
866  else
867  {
868  $this->ctrl->redirectByClass('ilobjcategorygui','listUsers');
869  }
870  }
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 800 of file class.ilObjUserFolderGUI.php.

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

801  {
802  global $tpl, $rbacsystem;
803 
804  // Blind out tabs for local user import
805  if ($_GET["baseClass"] == 'ilRepositoryGUI')
806  {
807  $this->tabs_gui->clearTargets();
808  }
809 
810  if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
811  {
812  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
813  }
814 
815  $this->initUserImportForm();
816  $tpl->setContent($this->form->getHTML());
817  }
$_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 889 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.

890  {
891  global $ilUser,$rbacreview, $tpl, $lng, $ilCtrl;;
892 
893  // Blind out tabs for local user import
894  if ($_GET["baseClass"] == 'ilRepositoryGUI')
895  {
896  $this->tabs_gui->clearTargets();
897  }
898 
899  $this->initUserImportForm();
900  if ($this->form->checkInput())
901  {
902  include_once './Services/AccessControl/classes/class.ilObjRole.php';
903  include_once './Services/User/classes/class.ilUserImportParser.php';
904 
905  global $rbacreview, $rbacsystem, $tree, $lng;
906 
907 
908  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.usr_import_roles.html", "Services/User");
909 
910  $import_dir = $this->getImportDir();
911 
912  // recreate user import directory
913  if (@is_dir($import_dir))
914  {
915  ilUtil::delDir($import_dir);
916  }
917  ilUtil::makeDir($import_dir);
918 
919  // move uploaded file to user import directory
920  $file_name = $_FILES["importFile"]["name"];
921  $parts = pathinfo($file_name);
922  $full_path = $import_dir."/".$file_name;
923 
924  // check if import file exists
925  if (!is_file($_FILES["importFile"]["tmp_name"]))
926  {
927  ilUtil::delDir($import_dir);
928  $this->ilias->raiseError($this->lng->txt("no_import_file_found")
929  , $this->ilias->error_obj->MESSAGE);
930  }
931  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"],
932  $_FILES["importFile"]["name"], $full_path);
933 
934  // handle zip file
935  if (strtolower($parts["extension"]) == "zip")
936  {
937  // unzip file
938  ilUtil::unzip($full_path);
939 
940  $xml_file = null;
941  $file_list = ilUtil::getDir($import_dir);
942  foreach ($file_list as $a_file)
943  {
944  if (substr($a_file['entry'],-4) == '.xml')
945  {
946  $xml_file = $import_dir."/".$a_file['entry'];
947  break;
948  }
949  }
950  if (is_null($xml_file))
951  {
952  $subdir = basename($parts["basename"],".".$parts["extension"]);
953  $xml_file = $import_dir."/".$subdir."/".$subdir.".xml";
954  }
955  }
956  // handle xml file
957  else
958  {
959  $xml_file = $full_path;
960  }
961 
962  // check xml file
963  if (!is_file($xml_file))
964  {
965  ilUtil::delDir($import_dir);
966  $this->ilias->raiseError($this->lng->txt("no_xml_file_found_in_zip")
967  ." ".$subdir."/".$subdir.".xml", $this->ilias->error_obj->MESSAGE);
968  }
969 
970  require_once("./Services/User/classes/class.ilUserImportParser.php");
971 
972  // Verify the data
973  // ---------------
974  $importParser = new ilUserImportParser($xml_file, IL_VERIFY);
975  $importParser->startParsing();
976  switch ($importParser->getErrorLevel())
977  {
978  case IL_IMPORT_SUCCESS :
979  break;
980  case IL_IMPORT_WARNING :
981  $this->tpl->setVariable("IMPORT_LOG", $importParser->getProtocolAsHTML($lng->txt("verification_warning_log")));
982  break;
983  case IL_IMPORT_FAILURE :
984  ilUtil::delDir($import_dir);
985  $this->ilias->raiseError(
986  $lng->txt("verification_failed").$importParser->getProtocolAsHTML($lng->txt("verification_failure_log")),
987  $this->ilias->error_obj->MESSAGE
988  );
989  return;
990  }
991 
992  // Create the role selection form
993  // ------------------------------
994  $this->tpl->setCurrentBlock("role_selection_form");
995  $this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
996  $this->tpl->setVariable("TXT_IMPORT_USERS", $this->lng->txt("import_users"));
997  $this->tpl->setVariable("TXT_IMPORT_FILE", $this->lng->txt("import_file"));
998  $this->tpl->setVariable("IMPORT_FILE", $file_name);
999  $this->tpl->setVariable("TXT_USER_ELEMENT_COUNT", $this->lng->txt("num_users"));
1000  $this->tpl->setVariable("USER_ELEMENT_COUNT", $importParser->getUserCount());
1001  $this->tpl->setVariable("TXT_ROLE_ASSIGNMENT", $this->lng->txt("role_assignment"));
1002  $this->tpl->setVariable("BTN_IMPORT", $this->lng->txt("import"));
1003  $this->tpl->setVariable("BTN_CANCEL", $this->lng->txt("cancel"));
1004  $this->tpl->setVariable("XML_FILE_NAME", $xml_file);
1005 
1006  // Extract the roles
1007  $importParser = new ilUserImportParser($xml_file, IL_EXTRACT_ROLES);
1008  $importParser->startParsing();
1009  $roles = $importParser->getCollectedRoles();
1010 
1011  // get global roles
1012  $all_gl_roles = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
1013  $gl_roles = array();
1014  $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1015  foreach ($all_gl_roles as $obj_data)
1016  {
1017  // check assignment permission if called from local admin
1018  if($this->object->getRefId() != USER_FOLDER_ID)
1019  {
1020  if(!in_array(SYSTEM_ROLE_ID,$roles_of_user) && !ilObjRole::_getAssignUsersStatus($obj_data['obj_id']))
1021  {
1022  continue;
1023  }
1024  }
1025  // exclude anonymous role from list
1026  if ($obj_data["obj_id"] != ANONYMOUS_ROLE_ID)
1027  {
1028  // do not allow to assign users to administrator role if current user does not has SYSTEM_ROLE_ID
1029  if ($obj_data["obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$roles_of_user))
1030  {
1031  $gl_roles[$obj_data["obj_id"]] = $obj_data["title"];
1032  }
1033  }
1034  }
1035 
1036  // global roles
1037  $got_globals = false;
1038  foreach($roles as $role_id => $role)
1039  {
1040  if ($role["type"] == "Global")
1041  {
1042  if (! $got_globals)
1043  {
1044  $got_globals = true;
1045 
1046  $this->tpl->setCurrentBlock("global_role_section");
1047  $this->tpl->setVariable("TXT_GLOBAL_ROLES_IMPORT", $this->lng->txt("roles_of_import_global"));
1048  $this->tpl->setVariable("TXT_GLOBAL_ROLES", $this->lng->txt("assign_global_role"));
1049  }
1050 
1051  // pre selection for role
1052  $pre_select = array_search($role[name], $gl_roles);
1053  if (! $pre_select)
1054  {
1055  switch($role["name"])
1056  {
1057  case "Administrator": // ILIAS 2/3 Administrator
1058  $pre_select = array_search("Administrator", $gl_roles);
1059  break;
1060 
1061  case "Autor": // ILIAS 2 Author
1062  $pre_select = array_search("User", $gl_roles);
1063  break;
1064 
1065  case "Lerner": // ILIAS 2 Learner
1066  $pre_select = array_search("User", $gl_roles);
1067  break;
1068 
1069  case "Gast": // ILIAS 2 Guest
1070  $pre_select = array_search("Guest", $gl_roles);
1071  break;
1072 
1073  default:
1074  $pre_select = array_search("User", $gl_roles);
1075  break;
1076  }
1077  }
1078  $this->tpl->setCurrentBlock("global_role");
1079  $role_select = ilUtil::formSelect($pre_select, "role_assign[".$role_id."]", $gl_roles, false, true);
1080  $this->tpl->setVariable("TXT_IMPORT_GLOBAL_ROLE", $role["name"]." [".$role_id."]");
1081  $this->tpl->setVariable("SELECT_GLOBAL_ROLE", $role_select);
1082  $this->tpl->parseCurrentBlock();
1083  }
1084  }
1085 
1086  // Check if local roles need to be assigned
1087  $got_locals = false;
1088  foreach($roles as $role_id => $role)
1089  {
1090  if ($role["type"] == "Local")
1091  {
1092  $got_locals = true;
1093  break;
1094  }
1095  }
1096 
1097  if ($got_locals)
1098  {
1099  $this->tpl->setCurrentBlock("local_role_section");
1100  $this->tpl->setVariable("TXT_LOCAL_ROLES_IMPORT", $this->lng->txt("roles_of_import_local"));
1101  $this->tpl->setVariable("TXT_LOCAL_ROLES", $this->lng->txt("assign_local_role"));
1102 
1103 
1104  // get local roles
1105  if ($this->object->getRefId() == USER_FOLDER_ID)
1106  {
1107  // The import function has been invoked from the user folder
1108  // object. In this case, we show only matching roles,
1109  // because the user folder object is considered the parent of all
1110  // local roles and may contains thousands of roles on large ILIAS
1111  // installations.
1112  $loc_roles = array();
1113  foreach($roles as $role_id => $role)
1114  {
1115  if ($role["type"] == "Local")
1116  {
1117  $searchName = (substr($role['name'],0,1) == '#') ? $role['name'] : '#'.$role['name'];
1118  $matching_role_ids = $rbacreview->searchRolesByMailboxAddressList($searchName);
1119  foreach ($matching_role_ids as $mid) {
1120  if (! in_array($mid, $loc_roles)) {
1121  $loc_roles[] = $mid;
1122  }
1123  }
1124  }
1125  }
1126  } else {
1127  // The import function has been invoked from a locally
1128  // administrated category. In this case, we show all roles
1129  // contained in the subtree of the category.
1130  $loc_roles = $rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1131  }
1132  $l_roles = array();
1133 
1134  // create a search array with .
1135  $l_roles_mailbox_searcharray = array();
1136  foreach ($loc_roles as $key => $loc_role)
1137  {
1138  // fetch context path of role
1139  $rolf = $rbacreview->getFoldersAssignedToRole($loc_role,true);
1140 
1141  // only process role folders that are not set to status "deleted"
1142  // and for which the user has write permissions.
1143  // We also don't show the roles which are in the ROLE_FOLDER_ID folder.
1144  // (The ROLE_FOLDER_ID folder contains the global roles).
1145  if (!$rbacreview->isDeleted($rolf[0])
1146  && $rbacsystem->checkAccess('write',$tree->getParentId($rolf[0]))
1147  && $rolf[0] != ROLE_FOLDER_ID
1148  )
1149  {
1150  // A local role is only displayed, if it is contained in the subtree of
1151  // the localy administrated category. If the import function has been
1152  // invoked from the user folder object, we show all local roles, because
1153  // the user folder object is considered the parent of all local roles.
1154  // Thus, if we start from the user folder object, we initialize the
1155  // isInSubtree variable with true. In all other cases it is initialized
1156  // with false, and only set to true if we find the object id of the
1157  // locally administrated category in the tree path to the local role.
1158  $isInSubtree = $this->object->getRefId() == USER_FOLDER_ID;
1159 
1160  $path = "";
1161  if ($this->tree->isInTree($rolf[0]))
1162  {
1163  // Create path. Paths which have more than 4 segments
1164  // are truncated in the middle.
1165  $tmpPath = $this->tree->getPathFull($rolf[0]);
1166  for ($i = 1, $n = count($tmpPath) - 1; $i < $n; $i++)
1167  {
1168  if ($i > 1)
1169  {
1170  $path = $path.' > ';
1171  }
1172  if ($i < 3 || $i > $n - 3)
1173  {
1174  $path = $path.$tmpPath[$i]['title'];
1175  }
1176  else if ($i == 3 || $i == $n - 3)
1177  {
1178  $path = $path.'...';
1179  }
1180 
1181  $isInSubtree |= $tmpPath[$i]['obj_id'] == $this->object->getId();
1182  }
1183  }
1184  else
1185  {
1186  $path = "<b>Rolefolder ".$rolf[0]." not found in tree! (Role ".$loc_role.")</b>";
1187  }
1188  $roleMailboxAddress = $rbacreview->getRoleMailboxAddress($loc_role);
1189  $l_roles[$loc_role] = $roleMailboxAddress.', '.$path;
1190  }
1191  } //foreach role
1192 
1193  $l_roles[""] = "";
1194  natcasesort($l_roles);
1195  $l_roles[""] = $this->lng->txt("usrimport_ignore_role");
1196  foreach($roles as $role_id => $role)
1197  {
1198  if ($role["type"] == "Local")
1199  {
1200  $this->tpl->setCurrentBlock("local_role");
1201  $this->tpl->setVariable("TXT_IMPORT_LOCAL_ROLE", $role["name"]);
1202  $searchName = (substr($role['name'],0,1) == '#') ? $role['name'] : '#'.$role['name'];
1203  $matching_role_ids = $rbacreview->searchRolesByMailboxAddressList($searchName);
1204  $pre_select = count($matching_role_ids) == 1 ? $matching_role_ids[0] : "";
1205  if ($this->object->getRefId() == USER_FOLDER_ID) {
1206  // There are too many roles in a large ILIAS installation
1207  // that's why whe show only a choice with the the option "ignore",
1208  // and the matching roles.
1209  $selectable_roles = array();
1210  $selectable_roles[""] = $this->lng->txt("usrimport_ignore_role");
1211  foreach ($matching_role_ids as $id)
1212  {
1213  $selectable_roles[$id] = $l_roles[$id];
1214  }
1215  $role_select = ilUtil::formSelect($pre_select, "role_assign[".$role_id."]", $selectable_roles, false, true);
1216  } else {
1217  $role_select = ilUtil::formSelect($pre_select, "role_assign[".$role_id."]", $l_roles, false, true);
1218  }
1219  $this->tpl->setVariable("SELECT_LOCAL_ROLE", $role_select);
1220  $this->tpl->parseCurrentBlock();
1221  }
1222  }
1223  }
1224  //
1225 
1226  $this->tpl->setVariable("TXT_CONFLICT_HANDLING", $lng->txt("conflict_handling"));
1227  $handlers = array(
1228  IL_IGNORE_ON_CONFLICT => "ignore_on_conflict",
1229  IL_UPDATE_ON_CONFLICT => "update_on_conflict"
1230  );
1231  $this->tpl->setVariable("TXT_CONFLICT_HANDLING_INFO", str_replace('\n','<br>',$this->lng->txt("usrimport_conflict_handling_info")));
1232  $this->tpl->setVariable("TXT_CONFLICT_CHOICE", $lng->txt("conflict_handling"));
1233  $this->tpl->setVariable("SELECT_CONFLICT", ilUtil::formSelect(IL_IGNORE_ON_CONFLICT, "conflict_handling_choice", $handlers, false, false));
1234 
1235  // new account mail
1236  $this->lng->loadLanguageModule("mail");
1237  include_once './Services/User/classes/class.ilObjUserFolder.php';
1238  $amail = ilObjUserFolder::_lookupNewAccountMail($this->lng->getDefaultLanguage());
1239  if (trim($amail["body"]) != "" && trim($amail["subject"]) != "")
1240  {
1241  $this->tpl->setCurrentBlock("inform_user");
1242  $this->tpl->setVariable("TXT_ACCOUNT_MAIL", $lng->txt("mail_account_mail"));
1243  if (true)
1244  {
1245  $this->tpl->setVariable("SEND_MAIL", " checked=\"checked\"");
1246  }
1247  $this->tpl->setVariable("TXT_INFORM_USER_MAIL",
1248  $this->lng->txt("user_send_new_account_mail"));
1249  $this->tpl->parseCurrentBlock();
1250  }
1251  }
1252  else
1253  {
1254  $this->form->setValuesByPost();
1255  $tpl->setContent($this->form->getHtml());
1256  }
1257  }
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 1262 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.

1263  {
1264  global $rbacreview,$ilUser;
1265 
1266  // Blind out tabs for local user import
1267  if ($_GET["baseClass"] == 'ilRepositoryGUI')
1268  {
1269  $this->tabs_gui->clearTargets();
1270  }
1271 
1272  include_once './Services/AccessControl/classes/class.ilObjRole.php';
1273  include_once './Services/User/classes/class.ilUserImportParser.php';
1274 
1275  global $rbacreview, $rbacsystem, $tree, $lng;
1276 
1277  switch ($_POST["conflict_handling_choice"])
1278  {
1279  case "update_on_conflict" :
1280  $rule = IL_UPDATE_ON_CONFLICT;
1281  break;
1282  case "ignore_on_conflict" :
1283  default :
1284  $rule = IL_IGNORE_ON_CONFLICT;
1285  break;
1286  }
1287  $importParser = new ilUserImportParser($_POST["xml_file"], IL_USER_IMPORT, $rule);
1288  $importParser->setFolderId($this->getUserOwnerId());
1289  $import_dir = $this->getImportDir();
1290 
1291  // Catch hack attempts
1292  // We check here again, if the role folders are in the tree, and if the
1293  // user has permission on the roles.
1294  if ($_POST["role_assign"])
1295  {
1296  $global_roles = $rbacreview->getGlobalRoles();
1297  $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1298  foreach ($_POST["role_assign"] as $role_id)
1299  {
1300  if ($role_id != "")
1301  {
1302  if (in_array($role_id, $global_roles))
1303  {
1304  if(!in_array(SYSTEM_ROLE_ID,$roles_of_user))
1305  {
1306  if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID,$roles_of_user)
1307  || ($this->object->getRefId() != USER_FOLDER_ID
1308  && ! ilObjRole::_getAssignUsersStatus($role_id))
1309  )
1310  {
1311  ilUtil::delDir($import_dir);
1312  $this->ilias->raiseError($this->lng->txt("usrimport_with_specified_role_not_permitted"),
1313  $this->ilias->error_obj->MESSAGE);
1314  }
1315  }
1316  }
1317  else
1318  {
1319  $rolf = $rbacreview->getFoldersAssignedToRole($role_id,true);
1320  if ($rbacreview->isDeleted($rolf[0])
1321  || ! $rbacsystem->checkAccess('write',$tree->getParentId($rolf[0])))
1322  {
1323  ilUtil::delDir($import_dir);
1324  $this->ilias->raiseError($this->lng->txt("usrimport_with_specified_role_not_permitted"),
1325  $this->ilias->error_obj->MESSAGE);
1326  return;
1327  }
1328  }
1329  }
1330  }
1331  }
1332 
1333  $importParser->setRoleAssignment($_POST["role_assign"]);
1334  $importParser->startParsing();
1335 
1336  // purge user import directory
1337  ilUtil::delDir($import_dir);
1338 
1339  switch ($importParser->getErrorLevel())
1340  {
1341  case IL_IMPORT_SUCCESS :
1342  ilUtil::sendSuccess($this->lng->txt("user_imported"), true);
1343  break;
1344  case IL_IMPORT_WARNING :
1345  ilUtil::sendInfo($this->lng->txt("user_imported_with_warnings").$importParser->getProtocolAsHTML($lng->txt("import_warning_log")), true);
1346  break;
1347  case IL_IMPORT_FAILURE :
1348  $this->ilias->raiseError(
1349  $this->lng->txt("user_import_failed")
1350  .$importParser->getProtocolAsHTML($lng->txt("import_failure_log")),
1351  $this->ilias->error_obj->MESSAGE
1352  );
1353  break;
1354  }
1355 
1356  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
1357  {
1358  $this->ctrl->redirect($this, "view");
1359  //ilUtil::redirect($this->ctrl->getLinkTarget($this));
1360  }
1361  else
1362  {
1363  $this->ctrl->redirectByClass('ilobjcategorygui','listUsers');
1364  }
1365  }
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 511 of file class.ilObjUserFolderGUI.php.

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

Referenced by confirmaccessRestrictObject(), and setAccessRestrictionObject().

512  {
513  $user_ids = $this->getActionUserIds();
514  if(!$user_ids)
515  {
516  ilUtil::sendFailure($this->lng->txt('select_one'));
517  return $this->viewObject();
518  }
519 
520  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
521  $form = new ilPropertyFormGUI();
522  $form->setTitle($this->lng->txt("time_limit_add_time_limit_for_selected"));
523  $form->setFormAction($this->ctrl->getFormAction($this, "confirmaccessRestrict"));
524 
525  $from = new ilDateTimeInputGUI($this->lng->txt("access_from"), "from");
526  $from->setShowTime(true);
527  $from->setRequired(true);
528  $form->addItem($from);
529 
530  $to = new ilDateTimeInputGUI($this->lng->txt("access_until"), "to");
531  $to->setRequired(true);
532  $to->setShowTime(true);
533  $form->addItem($to);
534 
535  $form->addCommandButton("confirmaccessRestrict", $this->lng->txt("confirm"));
536  $form->addCommandButton("view", $this->lng->txt("cancel"));
537 
538  foreach($user_ids as $user_id)
539  {
540  $ufield = new ilHiddenInputGUI("id[]");
541  $ufield->setValue($user_id);
542  $form->addItem($ufield);
543  }
544 
545  // return to search?
546  if($a_from_search || $_POST["frsrch"])
547  {
548  $field = new ilHiddenInputGUI("frsrch");
549  $field->setValue(1);
550  $form->addItem($field);
551  }
552 
553  return $form;
554  }
$_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 1885 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().

1886  {
1887  global $ilSetting;
1888 
1889  $this->setSubTabs('settings');
1890  $this->tabs_gui->setTabActive('settings');
1891  $this->tabs_gui->setSubTabActive('general_settings');
1892 
1893  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1894  $this->form = new ilPropertyFormGUI();
1895  $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveGeneralSettings'));
1896 
1897  $this->form->setTitle($this->lng->txt('general_settings'));
1898 
1899  $lua = new ilCheckboxInputGUI($this->lng->txt('enable_local_user_administration'),'lua');
1900  $lua->setInfo($this->lng->txt('enable_local_user_administration_info'));
1901  $lua->setValue(1);
1902  $this->form->addItem($lua);
1903 
1904  $lrua = new ilCheckboxInputGUI($this->lng->txt('restrict_user_access'),'lrua');
1905  $lrua->setInfo($this->lng->txt('restrict_user_access_info'));
1906  $lrua->setValue(1);
1907  $this->form->addItem($lrua);
1908 
1909  // enable alphabetical navigation in user administration
1910  $alph = new ilCheckboxInputGUI($this->lng->txt('user_adm_enable_alpha_nav'), 'user_adm_alpha_nav');
1911  //$alph->setInfo($this->lng->txt('restrict_user_access_info'));
1912  $alph->setValue(1);
1913  $this->form->addItem($alph);
1914 
1915  // account codes
1916  $code = new ilCheckboxInputGUI($this->lng->txt("user_account_code_setting"), "user_reactivate_code");
1917  $code->setInfo($this->lng->txt('user_account_code_setting_info'));
1918  $this->form->addItem($code);
1919 
1920  // delete own account
1921  $own = new ilCheckboxInputGUI($this->lng->txt("user_allow_delete_own_account"), "user_own_account");
1922  $this->form->addItem($own);
1923  $own_email = new ilEMailInputGUI($this->lng->txt("user_delete_own_account_notification_email"), "user_own_account_email");
1924  $own->addSubItem($own_email);
1925 
1926 
1927  // BEGIN SESSION SETTINGS
1928 
1929  // create session handling radio group
1930  $ssettings = new ilRadioGroupInputGUI($this->lng->txt('sess_mode'), 'session_handling_type');
1931 
1932  // first option, fixed session duration
1933  $fixed = new ilRadioOption($this->lng->txt('sess_fixed_duration'), ilSession::SESSION_HANDLING_FIXED);
1934 
1935  // create session reminder subform
1936  $cb = new ilCheckboxInputGUI($this->lng->txt("session_reminder"), "session_reminder_enabled");
1937  $expires = ilSession::getSessionExpireValue();
1938  $time = ilFormat::_secondsToString($expires, true);
1939  $cb->setInfo($this->lng->txt("session_reminder_info")."<br />".
1940  sprintf($this->lng->txt('session_reminder_session_duration'), $time));
1941  $fixed->addSubItem($cb);
1942 
1943  // add session handling to radio group
1944  $ssettings->addOption($fixed);
1945 
1946  // second option, session control
1947  $ldsh = new ilRadioOption($this->lng->txt('sess_load_dependent_session_handling'), ilSession::SESSION_HANDLING_LOAD_DEPENDENT);
1948 
1949  // add session control subform
1950  require_once('Services/Authentication/classes/class.ilSessionControl.php');
1951 
1952  // this is the max count of active sessions
1953  // that are getting started simlutanously
1954  $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_count'), 'session_max_count');
1955  $sub_ti->setMaxLength(5);
1956  $sub_ti->setSize(5);
1957  $sub_ti->setInfo($this->lng->txt('session_max_count_info'));
1958  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1959  $sub_ti->setDisabled(true);
1960  $ldsh->addSubItem($sub_ti);
1961 
1962  // after this (min) idle time the session can be deleted,
1963  // if there are further requests for new sessions,
1964  // but max session count is reached yet
1965  $sub_ti = new ilTextInputGUI($this->lng->txt('session_min_idle'), 'session_min_idle');
1966  $sub_ti->setMaxLength(5);
1967  $sub_ti->setSize(5);
1968  $sub_ti->setInfo($this->lng->txt('session_min_idle_info'));
1969  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1970  $sub_ti->setDisabled(true);
1971  $ldsh->addSubItem($sub_ti);
1972 
1973  // after this (max) idle timeout the session expires
1974  // and become invalid, so it is not considered anymore
1975  // when calculating current count of active sessions
1976  $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_idle'), 'session_max_idle');
1977  $sub_ti->setMaxLength(5);
1978  $sub_ti->setSize(5);
1979  $sub_ti->setInfo($this->lng->txt('session_max_idle_info'));
1980  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1981  $sub_ti->setDisabled(true);
1982  $ldsh->addSubItem($sub_ti);
1983 
1984  // this is the max duration that can elapse between the first and the secnd
1985  // request to the system before the session is immidietly deleted
1986  $sub_ti = new ilTextInputGUI(
1987  $this->lng->txt('session_max_idle_after_first_request'),
1988  'session_max_idle_after_first_request'
1989  );
1990  $sub_ti->setMaxLength(5);
1991  $sub_ti->setSize(5);
1992  $sub_ti->setInfo($this->lng->txt('session_max_idle_after_first_request_info'));
1993  if( !$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
1994  $sub_ti->setDisabled(true);
1995  $ldsh->addSubItem($sub_ti);
1996 
1997  // add session control to radio group
1998  $ssettings->addOption($ldsh);
1999 
2000  // add radio group to form
2001  if( $ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE) )
2002  {
2003  // just shows the status wether the session
2004  //setting maintenance is allowed by setup
2005  $this->form->addItem($ssettings);
2006  }
2007  else
2008  {
2009  // just shows the status wether the session
2010  //setting maintenance is allowed by setup
2011  $ti = new ilNonEditableValueGUI($this->lng->txt('session_config'), "session_config");
2012  $ti->setValue($this->lng->txt('session_config_maintenance_disabled'));
2013  $ssettings->setDisabled(true);
2014  $ti->addSubItem($ssettings);
2015  $this->form->addItem($ti);
2016  }
2017 
2018  // END SESSION SETTINGS
2019 
2020 
2021  $this->lng->loadLanguageModule('ps');
2022 
2023  $pass = new ilFormSectionHeaderGUI();
2024  $pass->setTitle($this->lng->txt('ps_password_settings'));
2025  $this->form->addItem($pass);
2026 
2027  // password generation
2028  $cb = new ilCheckboxInputGUI($this->lng->txt("passwd_generation_pre"), "passwd_auto_generate");
2029  $cb->setChecked($ilSetting->get("passwd_auto_generate"));
2030  $cb->setInfo($this->lng->txt("passwd_generation_info"));
2031  $this->form->addItem($cb);
2032 
2033  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_change_on_first_login_enabled'),'password_change_on_first_login_enabled');
2034  $check->setInfo($this->lng->txt('ps_password_change_on_first_login_enabled_info'));
2035  $this->form->addItem($check);
2036 
2037  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2038 
2039  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_must_not_contain_loginame'),'password_must_not_contain_loginame');
2040  $check->setInfo($this->lng->txt('ps_password_must_not_contain_loginame_info'));
2041  $this->form->addItem($check);
2042 
2043  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_chars_and_numbers_enabled'),'password_chars_and_numbers_enabled');
2044  //$check->setOptionTitle($this->lng->txt('ps_password_chars_and_numbers_enabled'));
2045  $check->setInfo($this->lng->txt('ps_password_chars_and_numbers_enabled_info'));
2046  $this->form->addItem($check);
2047 
2048  $check = new ilCheckboxInputGUI($this->lng->txt('ps_password_special_chars_enabled'),'password_special_chars_enabled');
2049  //$check->setOptionTitle($this->lng->txt('ps_password_special_chars_enabled'));
2050  $check->setInfo($this->lng->txt('ps_password_special_chars_enabled_info'));
2051  $this->form->addItem($check);
2052 
2053  $text = new ilNumberInputGUI($this->lng->txt('ps_password_min_length'),'password_min_length');
2054  $text->setInfo($this->lng->txt('ps_password_min_length_info'));
2055  $text->setSize(1);
2056  $text->setMaxLength(2);
2057  $this->form->addItem($text);
2058 
2059  $text = new ilNumberInputGUI($this->lng->txt('ps_password_max_length'),'password_max_length');
2060  $text->setInfo($this->lng->txt('ps_password_max_length_info'));
2061  $text->setSize(2);
2062  $text->setMaxLength(3);
2063  $this->form->addItem($text);
2064 
2065  $text = new ilNumberInputGUI($this->lng->txt('ps_password_uppercase_chars_num'), 'password_ucase_chars_num');
2066  $text->setInfo($this->lng->txt('ps_password_uppercase_chars_num_info'));
2067  $text->setMinValue(0);
2068  $text->setSize(2);
2069  $text->setMaxLength(3);
2070  $this->form->addItem($text);
2071 
2072  $text = new ilNumberInputGUI($this->lng->txt('ps_password_lowercase_chars_num'), 'password_lowercase_chars_num');
2073  $text->setInfo($this->lng->txt('ps_password_lowercase_chars_num_info'));
2074  $text->setMinValue(0);
2075  $text->setSize(2);
2076  $text->setMaxLength(3);
2077  $this->form->addItem($text);
2078 
2079  $text = new ilNumberInputGUI($this->lng->txt('ps_password_max_age'),'password_max_age');
2080  $text->setInfo($this->lng->txt('ps_password_max_age_info'));
2081  $text->setSize(2);
2082  $text->setMaxLength(3);
2083  $this->form->addItem($text);
2084 
2085  // password assistance
2086  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_password_assistance"), "password_assistance");
2087  $cb->setInfo($this->lng->txt("password_assistance_info"));
2088  $this->form->addItem($cb);
2089 
2090  $pass = new ilFormSectionHeaderGUI();
2091  $pass->setTitle($this->lng->txt('ps_security_protection'));
2092  $this->form->addItem($pass);
2093 
2094  $text = new ilNumberInputGUI($this->lng->txt('ps_login_max_attempts'),'login_max_attempts');
2095  $text->setInfo($this->lng->txt('ps_login_max_attempts_info'));
2096  $text->setSize(1);
2097  $text->setMaxLength(2);
2098  $this->form->addItem($text);
2099 
2100  // prevent login from multiple pcs at the same time
2101  $objCb = new ilCheckboxInputGUI($this->lng->txt('ps_prevent_simultaneous_logins'), 'ps_prevent_simultaneous_logins');
2102  $objCb->setValue(1);
2103  $objCb->setInfo($this->lng->txt('ps_prevent_simultaneous_logins_info'));
2104  $this->form->addItem($objCb);
2105 
2106 
2107 
2108 
2109  $log = new ilFormSectionHeaderGUI();
2110  $log->setTitle($this->lng->txt('loginname_settings'));
2111  $this->form->addItem($log);
2112 
2113  $chbChangeLogin = new ilCheckboxInputGUI($this->lng->txt('allow_change_loginname'), 'allow_change_loginname');
2114  $chbChangeLogin->setValue(1);
2115  $this->form->addItem($chbChangeLogin);
2116  $chbCreateHistory = new ilCheckboxInputGUI($this->lng->txt('history_loginname'), 'create_history_loginname');
2117  $chbCreateHistory->setInfo($this->lng->txt('loginname_history_info'));
2118  $chbCreateHistory->setValue(1);
2119 
2120  $chbChangeLogin->addSubItem($chbCreateHistory);
2121  $chbReuseLoginnames = new ilCheckboxInputGUI($this->lng->txt('reuse_of_loginnames_contained_in_history'), 'reuse_of_loginnames');
2122  $chbReuseLoginnames->setValue(1);
2123  $chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
2124 
2125  $chbChangeLogin->addSubItem($chbReuseLoginnames);
2126  $chbChangeBlockingTime = new ilNumberInputGUI($this->lng->txt('loginname_change_blocking_time'), 'loginname_change_blocking_time');
2127  $chbChangeBlockingTime->allowDecimals(true);
2128  $chbChangeBlockingTime->setSuffix($this->lng->txt('days'));
2129  $chbChangeBlockingTime->setInfo($this->lng->txt('loginname_change_blocking_time_info'));
2130  $chbChangeBlockingTime->setSize(10);
2131  $chbChangeBlockingTime->setMaxLength(10);
2132  $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2133 
2134  $this->form->addCommandButton('saveGeneralSettings', $this->lng->txt('save'));
2135  }
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 2849 of file class.ilObjUserFolderGUI.php.

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

Referenced by saveLoginnameSettingsObject(), and showLoginnameSettingsObject().

2850  {
2851  $this->setSubTabs('settings');
2852  $this->tabs_gui->setTabActive('settings');
2853  $this->tabs_gui->setSubTabActive('loginname_settings');
2854 
2855  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2856  $this->loginSettingsForm = new ilPropertyFormGUI;
2857  $this->loginSettingsForm->setFormAction($this->ctrl->getFormAction($this, 'saveLoginnameSettings'));
2858  $this->loginSettingsForm->setTitle($this->lng->txt('loginname_settings'));
2859 
2860  $chbChangeLogin = new ilCheckboxInputGUI($this->lng->txt('allow_change_loginname'), 'allow_change_loginname');
2861  $chbChangeLogin->setValue(1);
2862  $this->loginSettingsForm->addItem($chbChangeLogin);
2863  $chbCreateHistory = new ilCheckboxInputGUI($this->lng->txt('history_loginname'), 'create_history_loginname');
2864  $chbCreateHistory->setInfo($this->lng->txt('loginname_history_info'));
2865  $chbCreateHistory->setValue(1);
2866  $chbChangeLogin->addSubItem($chbCreateHistory);
2867  $chbReuseLoginnames = new ilCheckboxInputGUI($this->lng->txt('reuse_of_loginnames_contained_in_history'), 'reuse_of_loginnames');
2868  $chbReuseLoginnames->setValue(1);
2869  $chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
2870  $chbChangeLogin->addSubItem($chbReuseLoginnames);
2871  $chbChangeBlockingTime = new ilNumberInputGUI($this->lng->txt('loginname_change_blocking_time'), 'loginname_change_blocking_time');
2872  $chbChangeBlockingTime->allowDecimals(true);
2873  $chbChangeBlockingTime->setSuffix($this->lng->txt('days'));
2874  $chbChangeBlockingTime->setInfo($this->lng->txt('loginname_change_blocking_time_info'));
2875  $chbChangeBlockingTime->setSize(10);
2876  $chbChangeBlockingTime->setMaxLength(10);
2877  $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2878 
2879  $this->loginSettingsForm->addCommandButton('saveLoginnameSettings', $this->lng->txt('save'));
2880  }
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 2599 of file class.ilObjUserFolderGUI.php.

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

Referenced by newAccountMailObject().

2600  {
2601  global $lng, $ilCtrl;
2602 
2603  $lng->loadLanguageModule("meta");
2604  $lng->loadLanguageModule("mail");
2605 
2606  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2607  $form = new ilPropertyFormGUI();
2608  $form->setFormAction($ilCtrl->getFormAction($this));
2609 
2610  $form->setTitleIcon(ilUtil::getImagePath("icon_mail.png"));
2611  $form->setTitle($lng->txt("user_new_account_mail"));
2612  $form->setDescription($lng->txt("user_new_account_mail_desc"));
2613 
2614  $langs = $lng->getInstalledLanguages();
2615  foreach($langs as $lang_key)
2616  {
2617  $amail = $this->object->_lookupNewAccountMail($lang_key);
2618 
2619  $title = $lng->txt("meta_l_".$lang_key);
2620  if ($lang_key == $lng->getDefaultLanguage())
2621  {
2622  $title .= " (".$lng->txt("default").")";
2623  }
2624 
2625  $header = new ilFormSectionHeaderGUI();
2626  $header->setTitle($title);
2627  $form->addItem($header);
2628 
2629  $subj = new ilTextInputGUI($lng->txt("subject"), "subject_".$lang_key);
2630  // $subj->setRequired(true);
2631  $subj->setValue($amail["subject"]);
2632  $form->addItem($subj);
2633 
2634  $salg = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_".$lang_key);
2635  // $salg->setRequired(true);
2636  $salg->setValue($amail["sal_g"]);
2637  $form->addItem($salg);
2638 
2639  $salf = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_".$lang_key);
2640  // $salf->setRequired(true);
2641  $salf->setValue($amail["sal_f"]);
2642  $form->addItem($salf);
2643 
2644  $salm = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_".$lang_key);
2645  // $salm->setRequired(true);
2646  $salm->setValue($amail["sal_m"]);
2647  $form->addItem($salm);
2648 
2649  $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_".$lang_key);
2650  // $body->setRequired(true);
2651  $body->setValue($amail["body"]);
2652  $body->setRows(10);
2653  $body->setCols(100);
2654  $form->addItem($body);
2655 
2656  $att = new ilFileInputGUI($lng->txt("attachment"), "att_".$lang_key);
2657  $att->setAllowDeletion(true);
2658  if($amail["att_file"])
2659  {
2660  $att->setValue($amail["att_file"]);
2661  }
2662  $form->addItem($att);
2663  }
2664 
2665  $form->addCommandButton("saveNewAccountMail", $lng->txt("save"));
2666  $form->addCommandButton("cancelNewAccountMail", $lng->txt("cancel"));
2667 
2668  return $form;
2669  }
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 824 of file class.ilObjUserFolderGUI.php.

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

Referenced by importUserFormObject(), and importUserRoleAssignmentObject().

825  {
826  global $lng, $ilCtrl;
827 
828  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
829  $this->form = new ilPropertyFormGUI();
830 
831  // Import File
832  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
833  $fi = new ilFileInputGUI($lng->txt("import_file"), "importFile");
834  $fi->setSuffixes(array("xml", "zip"));
835  //$fi->enableFileNameSelection();
836  //$fi->setInfo($lng->txt(""));
837  $this->form->addItem($fi);
838 
839  $this->form->addCommandButton("importUserRoleAssignment", $lng->txt("import"));
840  $this->form->addCommandButton("importCancelled", $lng->txt("cancel"));
841 
842  $this->form->setTitle($lng->txt("import_users"));
843  $this->form->setFormAction($ilCtrl->getFormAction($this));
844 
845  }
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 2952 of file class.ilObjUserFolderGUI.php.

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

2953  {
2954  global $ilCtrl;
2955 
2956  if (((int) $_GET["jmpToUser"]) > 0 && ilObject::_lookupType((int)$_GET["jmpToUser"]) == "usr")
2957  {
2958  $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", (int) $_GET["jmpToUser"]);
2959  $ilCtrl->redirectByClass("ilobjusergui", "view");
2960  }
2961  }
$_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 122 of file class.ilObjUserFolderGUI.php.

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

123  {
124  global $rbacsystem, $tpl;
125 
126  // deprecated JF 27 May 2013
127  exit();
128 
129  if (!$rbacsystem->checkAccess("read",$this->object->getRefId()) ||
132  {
133  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
134  }
135 
136  include_once "Services/User/classes/class.ilUserLPTableGUI.php";
137  $tbl = new ilUserLPTableGUI($this, "learningProgress", $this->object->getRefId());
138 
139  $tpl->setContent($tbl->getHTML());
140  }
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 3079 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().

3080  {
3081  global $ilUser;
3082 
3083  $user_ids = $this->getActionUserIds();
3084  if(!$user_ids)
3085  {
3086  ilUtil::sendFailure($this->lng->txt('select_one'));
3087  return $this->viewObject();
3088  }
3089 
3090  // remove existing (temporary) lists
3091  include_once "Services/Contact/classes/class.ilMailingLists.php";
3092  $list = new ilMailingLists($ilUser);
3093  $list->deleteTemporaryLists();
3094 
3095  // create (temporary) mailing list
3096  include_once "Services/Contact/classes/class.ilMailingList.php";
3097  $list = new ilMailingList($ilUser);
3098  $list->setMode(ilMailingList::MODE_TEMPORARY);
3099  $list->setTitle("-TEMPORARY SYSTEM LIST-");
3100  $list->setDescription("-USER ACCOUNTS MAIL-");
3101  $list->setCreateDate(date("Y-m-d H:i:s"));
3102  $list->insert();
3103  $list_id = $list->getId();
3104 
3105  // after list has been saved...
3106  foreach($user_ids as $user_id)
3107  {
3108  $list->assignAddressbookEntry($user_id);
3109  }
3110 
3111  include_once "Services/Mail/classes/class.ilFormatMail.php";
3112  $umail = new ilFormatMail($ilUser->getId());
3113  $mail_data = $umail->getSavedData();
3114 
3115  if(!is_array($mail_data))
3116  {
3117  $mail_data = array("user_id" => $ilUser->getId());
3118  }
3119 
3120  // ???
3121  // $mail_data = $umail->appendSearchResult(array('#il_ml_'.$list_id), 'to');
3122 
3123  $umail->savePostData(
3124  $mail_data['user_id'],
3125  $mail_data['attachments'],
3126  '#il_ml_'.$list_id, // $mail_data['rcp_to'],
3127  $mail_data['rcp_cc'],
3128  $mail_data['rcp_bcc'],
3129  $mail_data['m_type'],
3130  $mail_data['m_email'],
3131  $mail_data['m_subject'],
3132  $mail_data['m_message'],
3133  $mail_data['use_placeholders']
3134  );
3135 
3136  ilUtil::redirect("ilias.php?baseClass=ilMailGUI&type=search_res");
3137  }
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 2674 of file class.ilObjUserFolderGUI.php.

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

2675  {
2676  global $lng;
2677 
2678  $this->setSubTabs('settings');
2679  $this->tabs_gui->setTabActive('settings');
2680  $this->tabs_gui->setSubTabActive('user_new_account_mail');
2681 
2682  $form = $this->initNewAccountMailForm();
2683 
2684  $ftpl = new ilTemplate('tpl.usrf_new_account_mail.html', true, true, 'Services/User');
2685  $ftpl->setVariable("FORM", $form->getHTML());
2686  unset($form);
2687 
2688  // placeholder help text
2689  $ftpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
2690  $ftpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
2691  $ftpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
2692  $ftpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
2693  $ftpl->setVariable("TXT_EMAIL", $lng->txt("email"));
2694  $ftpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
2695  $ftpl->setVariable("TXT_PASSWORD", $lng->txt("password"));
2696  $ftpl->setVariable("TXT_PASSWORD_BLOCK", $lng->txt("mail_nacc_pw_block"));
2697  $ftpl->setVariable("TXT_NOPASSWORD_BLOCK", $lng->txt("mail_nacc_no_pw_block"));
2698  $ftpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
2699  $ftpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
2700  $ftpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
2701  $ftpl->setVariable("TXT_TARGET", $lng->txt("mail_nacc_target"));
2702  $ftpl->setVariable("TXT_TARGET_TITLE", $lng->txt("mail_nacc_target_title"));
2703  $ftpl->setVariable("TXT_TARGET_TYPE", $lng->txt("mail_nacc_target_type"));
2704  $ftpl->setVariable("TXT_TARGET_BLOCK", $lng->txt("mail_nacc_target_block"));
2705  $ftpl->setVariable("TXT_IF_TIMELIMIT", $lng->txt("mail_nacc_if_timelimit"));
2706  $ftpl->setVariable("TXT_TIMELIMIT", $lng->txt("mail_nacc_timelimit"));
2707 
2708  $this->tpl->setContent($ftpl->get());
2709  }
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 146 of file class.ilObjUserFolderGUI.php.

References ilObjectGUI\viewObject().

147  {
148  include_once("./Services/User/classes/class.ilUserTableGUI.php");
149  $utab = new ilUserTableGUI($this, "view");
150  $utab->resetOffset();
151  $utab->resetFilter();
152 
153  // from "old" implementation
154  $this->viewObject(TRUE);
155  }
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 777 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

778  {
779  $_POST["selectedAction"] = "accessRestrict";
780  $this->showActionConfirmation($_POST["selectedAction"]);
781  }
$_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 1772 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().

1773  {
1774  global $ilUser, $ilSetting;
1775 
1776  $this->initFormGeneralSettings();
1777  if($this->form->checkInput())
1778  {
1779  $valid = true;
1780 
1781  if(!strlen($this->form->getInput('loginname_change_blocking_time')))
1782  {
1783  $valid = false;
1784  $this->form->getItemByPostVar('loginname_change_blocking_time')
1785  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
1786  }
1787 
1788  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1789  $security = ilSecuritySettings::_getInstance();
1790 
1791  // account security settings
1792  $security->setPasswordCharsAndNumbersEnabled((bool) $_POST["password_chars_and_numbers_enabled"]);
1793  $security->setPasswordSpecialCharsEnabled((bool) $_POST["password_special_chars_enabled"]);
1794  $security->setPasswordMinLength((int) $_POST["password_min_length"]);
1795  $security->setPasswordMaxLength((int) $_POST["password_max_length"]);
1796  $security->setPasswordNumberOfUppercaseChars((int) $_POST['password_ucase_chars_num']);
1797  $security->setPasswordNumberOfLowercaseChars((int) $_POST['password_lowercase_chars_num']);
1798  $security->setPasswordMaxAge((int) $_POST["password_max_age"]);
1799  $security->setLoginMaxAttempts((int) $_POST["login_max_attempts"]);
1800  $security->setPreventionOfSimultaneousLogins((bool)$_POST['ps_prevent_simultaneous_logins']);
1801  $security->setPasswordChangeOnFirstLoginEnabled((bool) $_POST['password_change_on_first_login_enabled']);
1802  $security->setPasswordMustNotContainLoginnameStatus((int) $_POST['password_must_not_contain_loginame']);
1803 
1804  if(!$security->validate($this->form))
1805  {
1806  $valid = false;
1807  }
1808 
1809  if($valid)
1810  {
1811  $security->save();
1812 
1813  include_once './Services/User/classes/class.ilUserAccountSettings.php';
1814  ilUserAccountSettings::getInstance()->enableLocalUserAdministration($this->form->getInput('lua'));
1815  ilUserAccountSettings::getInstance()->restrictUserAccess($this->form->getInput('lrua'));
1817 
1818  $ilSetting->set('allow_change_loginname', (int)$this->form->getInput('allow_change_loginname'));
1819  $ilSetting->set('create_history_loginname', (int)$this->form->getInput('create_history_loginname'));
1820  $ilSetting->set('reuse_of_loginnames', (int)$this->form->getInput('reuse_of_loginnames'));
1821  $save_blocking_time_in_seconds = (int)($this->form->getInput('loginname_change_blocking_time') * 86400);
1822  $ilSetting->set('loginname_change_blocking_time', (int)$save_blocking_time_in_seconds);
1823  $ilSetting->set('user_adm_alpha_nav', (int)$this->form->getInput('user_adm_alpha_nav'));
1824  $ilSetting->set('user_reactivate_code', (int)$this->form->getInput('user_reactivate_code'));
1825 
1826  $ilSetting->set('user_delete_own_account', (int)$this->form->getInput('user_own_account'));
1827  $ilSetting->set('user_delete_own_account_email', $this->form->getInput('user_own_account_email'));
1828 
1829  $ilSetting->set("passwd_auto_generate", $this->form->getInput("passwd_auto_generate"));
1830  $ilSetting->set("password_assistance", $this->form->getInput("password_assistance"));
1831 
1832  // BEGIN SESSION SETTINGS
1833  $ilSetting->set('session_handling_type',
1834  (int)$this->form->getInput('session_handling_type'));
1835 
1836  if( $this->form->getInput('session_handling_type') == ilSession::SESSION_HANDLING_FIXED )
1837  {
1838  $ilSetting->set('session_reminder_enabled',
1839  $this->form->getInput('session_reminder_enabled'));
1840  }
1841  else if( $this->form->getInput('session_handling_type') == ilSession::SESSION_HANDLING_LOAD_DEPENDENT )
1842  {
1843  require_once 'Services/Authentication/classes/class.ilSessionControl.php';
1844  if(
1845  $ilSetting->get('session_allow_client_maintenance',
1847  )
1848  {
1849  // has to be done BEFORE updating the setting!
1850  include_once "Services/Authentication/classes/class.ilSessionStatistics.php";
1851  ilSessionStatistics::updateLimitLog((int)$this->form->getInput('session_max_count'));
1852 
1853  $ilSetting->set('session_max_count',
1854  (int)$this->form->getInput('session_max_count'));
1855  $ilSetting->set('session_min_idle',
1856  (int)$this->form->getInput('session_min_idle'));
1857  $ilSetting->set('session_max_idle',
1858  (int)$this->form->getInput('session_max_idle'));
1859  $ilSetting->set('session_max_idle_after_first_request',
1860  (int)$this->form->getInput('session_max_idle_after_first_request'));
1861  }
1862  }
1863  // END SESSION SETTINGS
1864 
1865  ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
1866  }
1867  else
1868  {
1869  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
1870  }
1871  }
1872  else
1873  {
1874  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
1875  }
1876  $this->form->setValuesByPost();
1877  $this->tpl->setContent($this->form->getHTML());
1878  }
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 2172 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().

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

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

2883  {
2884  global $ilUser, $ilSetting;
2885 
2886  $this->initLoginSettingsForm();
2887  if($this->loginSettingsForm->checkInput())
2888  {
2889  $valid = true;
2890 
2891  if(!strlen($this->loginSettingsForm->getInput('loginname_change_blocking_time')))
2892  {
2893  $valid = false;
2894  $this->loginSettingsForm->getItemByPostVar('loginname_change_blocking_time')
2895  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
2896  }
2897 
2898  if($valid)
2899  {
2900  $save_blocking_time_in_seconds = (int)$this->loginSettingsForm->getInput('loginname_change_blocking_time') * 86400;
2901 
2902  $ilSetting->set('allow_change_loginname', (int)$this->loginSettingsForm->getInput('allow_change_loginname'));
2903  $ilSetting->set('create_history_loginname', (int)$this->loginSettingsForm->getInput('create_history_loginname'));
2904  $ilSetting->set('reuse_of_loginnames', (int)$this->loginSettingsForm->getInput('reuse_of_loginnames'));
2905  $ilSetting->set('loginname_change_blocking_time', (int)$save_blocking_time_in_seconds);
2906 
2907  ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
2908  }
2909  else
2910  {
2911  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
2912  }
2913  }
2914  else
2915  {
2916  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
2917  }
2918  $this->loginSettingsForm->setValuesByPost();
2919 
2920  $this->tpl->setVariable('ADM_CONTENT', $this->loginSettingsForm->getHTML());
2921  }
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 2716 of file class.ilObjUserFolderGUI.php.

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

2717  {
2718  global $lng;
2719 
2720  $langs = $lng->getInstalledLanguages();
2721  foreach($langs as $lang_key)
2722  {
2723  $this->object->_writeNewAccountMail($lang_key,
2724  ilUtil::stripSlashes($_POST["subject_".$lang_key]),
2725  ilUtil::stripSlashes($_POST["sal_g_".$lang_key]),
2726  ilUtil::stripSlashes($_POST["sal_f_".$lang_key]),
2727  ilUtil::stripSlashes($_POST["sal_m_".$lang_key]),
2728  ilUtil::stripSlashes($_POST["body_".$lang_key]));
2729 
2730  if($_FILES["att_".$lang_key]["tmp_name"])
2731  {
2732  $this->object->_updateAccountMailAttachment($lang_key,
2733  $_FILES["att_".$lang_key]["tmp_name"],
2734  $_FILES["att_".$lang_key]["name"]);
2735  }
2736 
2737  if ($_POST["att_".$lang_key."_delete"])
2738  {
2739  $this->object->_deleteAccountMailAttachment($lang_key);
2740  }
2741  }
2742 
2743  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2744  $this->ctrl->redirect($this, "newAccountMail");
2745  }
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 2966 of file class.ilObjUserFolderGUI.php.

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

2967  {
2968  if(!count((array) $a_usr_ids))
2969  {
2970  ilUtil::sendFailure($this->lng->txt('select_one'));
2971  return false;
2972  }
2973 
2974  $_POST['id'] = $a_usr_ids;
2975 
2976  // no real confirmation here
2977  if(stristr($a_cmd, "export"))
2978  {
2979  $cmd = $a_cmd."Object";
2980  return $this->$cmd();
2981  }
2982 
2983  $_POST['selectedAction'] = $a_cmd;
2984  return $this->showActionConfirmation($a_cmd, true);
2985  }
$_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 499 of file class.ilObjUserFolderGUI.php.

References initAccessRestrictionForm().

Referenced by confirmaccessRestrictObject(), and showActionConfirmation().

500  {
501  if(!$a_form)
502  {
503  $a_form = $this->initAccessRestrictionForm($a_from_search);
504  }
505  $this->tpl->setContent($a_form->getHTML());
506 
507  // #10963
508  return true;
509  }
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 2807 of file class.ilObjUserFolderGUI.php.

References $ilUser.

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

2808  {
2809  global $rbacsystem,$ilUser;
2810 
2811  switch($a_tab)
2812  {
2813  case "settings":
2814  $this->tabs_gui->addSubTabTarget(
2815  'general_settings',
2816  $this->ctrl->getLinkTarget($this, 'generalSettings'), 'generalSettings', get_class($this));
2817  $this->tabs_gui->addSubTabTarget("standard_fields",
2818  $this->ctrl->getLinkTarget($this,'settings'),
2819  array("settings", "saveGlobalUserSettings"), get_class($this));
2820  $this->tabs_gui->addSubTabTarget("user_defined_fields",
2821  $this->ctrl->getLinkTargetByClass("ilcustomuserfieldsgui", "listUserDefinedFields"),
2822  "listUserDefinedFields",get_class($this));
2823  $this->tabs_gui->addSubTabTarget("user_new_account_mail",
2824  $this->ctrl->getLinkTarget($this,'newAccountMail'),
2825  "newAccountMail",get_class($this));
2826  $this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"),
2827  $this->ctrl->getLinkTargetByClass("ilaccountcodesgui"));
2828  break;
2829  }
2830  }
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 2150 of file class.ilObjUserFolderGUI.php.

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

Referenced by saveGlobalUserSettingsObject().

2151  {
2152  global $tpl, $lng, $ilias, $ilTabs;
2153 
2154  include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
2155  $lng->loadLanguageModule("administration");
2156  $lng->loadLanguageModule("mail");
2157  $this->setSubTabs('settings');
2158  $ilTabs->activateTab('settings');
2159  $ilTabs->activateSubTab('standard_fields');
2160 
2161  include_once("./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
2162  $tab = new ilUserFieldSettingsTableGUI($this, "settings");
2163  if($this->confirm_change) $tab->setConfirmChange();
2164  $tpl->setContent($tab->getHTML());
2165  }
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 670 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().

671  {
672  global $ilTabs;
673 
674  $user_ids = $this->getActionUserIds();
675  if(!$user_ids)
676  {
677  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
678  }
679 
680  if(!$a_from_search)
681  {
682  $ilTabs->activateTab("obj_usrf");
683  }
684  else
685  {
686  $ilTabs->activateTab("search_user_extended");
687  }
688 
689  if (strcmp($action, "accessRestrict") == 0)
690  {
691  return $this->setAccessRestrictionObject(null, $a_from_search);
692  }
693  if (strcmp($action, "mail") == 0)
694  {
695  return $this->mailObject();
696  }
697 
698  unset($this->data);
699 
700  if(!$a_from_search)
701  {
702  $cancel = "cancelUserFolderAction";
703  }
704  else
705  {
706  $cancel = "cancelSearchAction";
707  }
708 
709  // display confirmation message
710  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
711  $cgui = new ilConfirmationGUI();
712  $cgui->setFormAction($this->ctrl->getFormAction($this));
713  $cgui->setHeaderText($this->lng->txt("info_" . $action . "_sure"));
714  $cgui->setCancel($this->lng->txt("cancel"), $cancel);
715  $cgui->setConfirm($this->lng->txt("confirm"), "confirm" . $action);
716 
717  if($a_from_search)
718  {
719  $cgui->addHiddenItem("frsrch", 1);
720  }
721 
722  foreach($user_ids as $id)
723  {
724  $user = new ilObjUser($id);
725 
726  $login = $user->getLastLogin();
727  if(!$login)
728  {
729  $login = $this->lng->txt("never");
730  }
731  else
732  {
734  }
735 
736  $caption = $user->getFullname()." (".$user->getLogin().")".", ".
737  $user->getEmail()." - ".$this->lng->txt("last_login").": ".$login;
738 
739  $cgui->addItem("id[]", $id, $caption);
740  }
741 
742  $this->tpl->setContent($cgui->getHTML());
743 
744  return true;
745  }
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 258 of file class.ilObjUserFolderGUI.php.

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

259  {
260  global $rbacsystem;
261 
262  $operations = array();
263 //var_dump($this->actions);
264  if ($this->actions == "")
265  {
266  $d = array(
267  "delete" => array("name" => "delete", "lng" => "delete"),
268  "activate" => array("name" => "activate", "lng" => "activate"),
269  "deactivate" => array("name" => "deactivate", "lng" => "deactivate"),
270  "accessRestrict" => array("name" => "accessRestrict", "lng" => "accessRestrict"),
271  "accessFree" => array("name" => "accessFree", "lng" => "accessFree"),
272  "export" => array("name" => "export", "lng" => "export")
273  );
274  }
275  else
276  {
277  $d = $this->actions;
278  }
279  foreach ($d as $row)
280  {
281  if ($rbacsystem->checkAccess($row["name"],$this->object->getRefId()))
282  {
283  $operations[] = $row;
284  }
285  }
286 
287  if (count($operations) > 0)
288  {
289  $select = "<select name=\"selectedAction\">\n";
290  foreach ($operations as $val)
291  {
292  $select .= "<option value=\"" . $val["name"] . "\"";
293  if (strcmp($_POST["selectedAction"], $val["name"]) == 0)
294  {
295  $select .= " selected=\"selected\"";
296  }
297  $select .= ">";
298  $select .= $this->lng->txt($val["lng"]);
299  $select .= "</option>";
300  }
301  $select .= "</select>";
302  $this->tpl->setCurrentBlock("tbl_action_select");
303  $this->tpl->setVariable("SELECT_ACTION", $select);
304  $this->tpl->setVariable("BTN_NAME", "userAction");
305  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("submit"));
306  $this->tpl->parseCurrentBlock();
307  }
308 
309  if ($with_subobjects === true)
310  {
311  $subobjs = $this->showPossibleSubObjects();
312  }
313 
314  if ((count($operations) > 0) or $subobjs === true)
315  {
316  $this->tpl->setCurrentBlock("tbl_action_row");
317  $this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
318  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
319  $this->tpl->setVariable("ALT_ARROW", $this->lng->txt("actions"));
320  $this->tpl->parseCurrentBlock();
321  }
322  }
$_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 2832 of file class.ilObjUserFolderGUI.php.

References $ilSetting, and initLoginSettingsForm().

2833  {
2834  global $ilSetting;
2835 
2836  $show_blocking_time_in_days = (int)$ilSetting->get('loginname_change_blocking_time') / 86400;
2837 
2838  $this->initLoginSettingsForm();
2839  $this->loginSettingsForm->setValuesByArray(array(
2840  'allow_change_loginname' => (bool)$ilSetting->get('allow_change_loginname'),
2841  'create_history_loginname' => (bool)$ilSetting->get('create_history_loginname'),
2842  'reuse_of_loginnames' => (bool)$ilSetting->get('reuse_of_loginnames'),
2843  'loginname_change_blocking_time' => (float)$show_blocking_time_in_days
2844  ));
2845 
2846  $this->tpl->setVariable('ADM_CONTENT', $this->loginSettingsForm->getHTML());
2847  }
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 330 of file class.ilObjUserFolderGUI.php.

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

Referenced by showActions().

331  {
332  global $rbacsystem;
333 
334  $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
335 
336  if (!$rbacsystem->checkAccess('create_usr',$this->object->getRefId()))
337  {
338  unset($d["usr"]);
339  }
340 
341  if (count($d) > 0)
342  {
343  foreach ($d as $row)
344  {
345  $count = 0;
346  if ($row["max"] > 0)
347  {
348  //how many elements are present?
349  for ($i=0; $i<count($this->data["ctrl"]); $i++)
350  {
351  if ($this->data["ctrl"][$i]["type"] == $row["name"])
352  {
353  $count++;
354  }
355  }
356  }
357  if ($row["max"] == "" || $count < $row["max"])
358  {
359  $subobj[] = $row["name"];
360  }
361  }
362  }
363 
364  if (is_array($subobj))
365  {
366  //build form
367  $opts = ilUtil::formSelect(12,"new_type",$subobj);
368  $this->tpl->setCurrentBlock("add_object");
369  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
370  $this->tpl->setVariable("BTN_NAME", "create");
371  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
372  $this->tpl->parseCurrentBlock();
373 
374  return true;
375  }
376 
377  return false;
378  }
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 1524 of file class.ilObjUserFolderGUI.php.

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

1525  {
1526  global $rbacsystem;
1527 
1528  if(!$rbacsystem->checkAccess("write", $this->ref_id))
1529  {
1530  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
1531  }
1532 
1533  $start = $this->__toUnix($_POST['au']['time_limit_start']);
1534  $end = $this->__toUnix($_POST['au']['time_limit_end']);
1535 
1536  if(!$_POST['au']['time_limit_unlimited'])
1537  {
1538  if($start > $end)
1539  {
1540  $_SESSION['error_post_vars'] = $_POST;
1541  ilUtil::sendFailure($this->lng->txt('time_limit_not_valid'));
1542  $this->editAppliedUsersObject();
1543 
1544  return false;
1545  }
1546  }
1547  #if(!$this->ilias->account->getTimeLimitUnlimited())
1548  #{
1549  # if($start < $this->ilias->account->getTimeLimitFrom() or
1550  # $end > $this->ilias->account->getTimeLimitUntil())
1551  # {
1552  # $_SESSION['error_post_vars'] = $_POST;
1553  # ilUtil::sendInfo($this->lng->txt('time_limit_not_within_owners'));
1554  # $this->editAppliedUsersObject();
1555 
1556  # return false;
1557  # }
1558  #}
1559 
1560  foreach($_SESSION['applied_users'] as $usr_id)
1561  {
1562  $tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
1563 
1564  $tmp_user->setTimeLimitUnlimited((int) $_POST['au']['time_limit_unlimited']);
1565  $tmp_user->setTimeLimitFrom($start);
1566  $tmp_user->setTimeLimitUntil($end);
1567  $tmp_user->setTimeLimitMessage(0);
1568  $tmp_user->update();
1569 
1570  unset($tmp_user);
1571  }
1572 
1573  unset($_SESSION['applied_users']);
1574  ilUtil::sendSuccess($this->lng->txt('time_limit_users_updated'));
1575  $this->appliedUsersObject();
1576 
1577  return true;
1578  }
< 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 792 of file class.ilObjUserFolderGUI.php.

References $_POST, and showActionConfirmation().

793  {
794  $this->showActionConfirmation($_POST["selectedAction"]);
795  }
$_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 3055 of file class.ilObjUserFolderGUI.php.

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

3056  {
3057  $user_ids = $this->getActionUserIds();
3058  if(!$user_ids)
3059  {
3060  ilUtil::sendFailure($this->lng->txt('select_one'));
3061  return $this->viewObject();
3062  }
3063  $this->object->buildExportFile("userfolder_export_csv", $user_ids);
3064  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3065  }
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 3043 of file class.ilObjUserFolderGUI.php.

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

3044  {
3045  $user_ids = $this->getActionUserIds();
3046  if(!$user_ids)
3047  {
3048  ilUtil::sendFailure($this->lng->txt('select_one'));
3049  return $this->viewObject();
3050  }
3051  $this->object->buildExportFile("userfolder_export_excel_x86", $user_ids);
3052  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3053  }
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 3067 of file class.ilObjUserFolderGUI.php.

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

3068  {
3069  $user_ids = $this->getActionUserIds();
3070  if(!$user_ids)
3071  {
3072  ilUtil::sendFailure($this->lng->txt('select_one'));
3073  return $this->viewObject();
3074  }
3075  $this->object->buildExportFile("userfolder_export_xml", $user_ids);
3076  $this->ctrl->redirectByClass("ilobjuserfoldergui", "export");
3077  }
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 189 of file class.ilObjUserFolderGUI.php.

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

190  {
191  global $rbacsystem, $ilUser, $ilToolbar, $tpl, $ilSetting, $lng;
192 
193  $ilToolbar->addButton($this->lng->txt("usr_add"),
194  $this->ctrl->getLinkTarget($this, "addUser"));
195  $ilToolbar->addButton($this->lng->txt("import_users"),
196  $this->ctrl->getLinkTarget($this, "importUserForm"));
197 
198  // alphabetical navigation
199  include_once './Services/User/classes/class.ilUserAccountSettings.php';
201  if ((int) $ilSetting->get('user_adm_alpha_nav'))
202  {
203  $ilToolbar->addSeparator();
204 
205  // alphabetical navigation
206  include_once("./Services/Form/classes/class.ilAlphabetInputGUI.php");
207  $ai = new ilAlphabetInputGUI("", "first");
208  include_once("./Services/User/classes/class.ilObjUser.php");
209  $ai->setLetters(ilObjUser::getFirstLettersOfLastnames());
210  /*$ai->setLetters(array("A","B","C","D","E","F","G","H","I","J",
211  "K","L","M","N","O","P","Q","R","S","T",
212  "U","V","W","X","Y","Z","1","2","3","4","_",
213  "Ä","Ü","Ö",":",";","+","*","#","§","%","&"));*/
214  $ai->setParentCommand($this, "chooseLetter");
215  $ai->setHighlighted($_GET["letter"]);
216  $ilToolbar->addInputItem($ai, true);
217 
218  }
219 
220  include_once("./Services/User/classes/class.ilUserTableGUI.php");
221  $utab = new ilUserTableGUI($this, "view");
222  $tpl->setContent($utab->getHTML());
223  }
$_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: