ILIAS  release_8 Revision v8.23
ilObjUserFolderGUI Class Reference
+ Inheritance diagram for ilObjUserFolderGUI:
+ Collaboration diagram for ilObjUserFolderGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference)
 
 setUserOwnerId (int $a_id)
 
 getUserOwnerId ()
 
 executeCommand ()
 
 resetFilterObject ()
 
 addUserObject ()
 Add new user. More...
 
 applyFilterObject ()
 
 viewObject (bool $reset_filter=false)
 list users More...
 
 filterUserIdsByRbacOrPositionOfCurrentUser (array $user_ids)
 
 chooseLetterObject ()
 
 cancelUserFolderActionObject ()
 
 cancelSearchActionObject ()
 
 confirmactivateObject ()
 Set the selected users active. More...
 
 confirmdeactivateObject ()
 Set the selected users inactive. More...
 
 setAccessRestrictionObject (?ilPropertyFormGUI $a_form=null, bool $a_from_search=false)
 
 confirmdeleteObject ()
 
 showActionConfirmation (string $action, bool $a_from_search=false)
 display activation confirmation screen More...
 
 deleteUsersObject ()
 
 activateUsersObject ()
 
 deactivateUsersObject ()
 
 restrictAccessObject ()
 
 freeAccessObject ()
 Free access. More...
 
 userActionObject ()
 
 importUserFormObject ()
 display form for user import More...
 
 initUserImportForm ()
 Init user import form. More...
 
 importCancelledObject ()
 
 getImportDir ()
 
 importUserRoleAssignmentObject ()
 display form for user import with new FileSystem implementation More...
 
 verifyXmlData (ilUserImportParser $import_parser)
 
 importUsersObject ()
 Import Users with new form implementation. More...
 
 saveGeneralSettingsObject ()
 Save user account settings. More...
 
 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. More...
 
 confirmSavedObject ()
 
 saveGlobalUserSettingsObject (string $action="")
 
 confirmUsrFieldChangeListenersObject ()
 
 showFieldChangeComponentsListeningConfirmDialog (array $interestedChangeListeners)
 
 __buildUserFilterSelect ()
 build select form to distinguish between active and non-active users More...
 
 downloadExportFileObject ()
 Download selected export files Sends a selected export file for download. More...
 
 confirmDeleteExportFileObject ()
 confirmation screen for export file deletion More...
 
 cancelDeleteExportFileObject ()
 cancel deletion of export files More...
 
 deleteExportFileObject ()
 delete export files More...
 
 exportObject ()
 
 newAccountMailObject ()
 new account mail administration More...
 
 cancelNewAccountMailObject ()
 
 saveNewAccountMailObject ()
 
 getAdminTabs ()
 
 setSubTabs (string $a_tab)
 
 showLoginnameSettingsObject ()
 
 saveLoginnameSettingsObject ()
 
 jumpToUserObject ()
 Jump to edit screen for user. More...
 
 searchUserAccessFilterCallable (array $a_user_ids)
 
 searchResultHandler (array $a_usr_ids, string $a_cmd)
 Handles multi command from repository search gui. More...
 
 getUserMultiCommands (bool $a_search_form=false)
 
 addToExternalSettingsForm (int $a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 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 ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (int $a_user)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const USER_FIELD_TRANSLATION_MAPPING
 
const changeable
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 addUserAutoCompleteObject ()
 Show auto complete results. More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders More...
 
 confirmaccessFreeObject ()
 
 initAccessRestrictionForm (bool $a_from_search=false)
 
 confirmaccessRestrictObject ()
 
 getActionUserIds ()
 Get selected items for table action. More...
 
 inAdministration ()
 
 generalSettingsObject ()
 Show user account general settings. More...
 
 forceUserPasswordResetObject ()
 
 askForUserPasswordResetObject ()
 
 initFormGeneralSettings ()
 init general settings form More...
 
 performExportObject ()
 
 initNewAccountMailForm ()
 
 getTabs ()
 
 usrExportX86Object ()
 Export excel. More...
 
 usrExportCsvObject ()
 Export csv. More...
 
 usrExportXmlObject ()
 Export xml. More...
 
 mailObject ()
 
 addToClipboardObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilPropertyFormGUI $loginSettingsForm
 
ilPropertyFormGUI $form
 
array $requested_ids
 
string $selected_action
 
ILIAS User StandardGUIRequest $user_request
 
int $user_owner_id = 0
 
int $confirm_change = 0
 
ilLogger $log
 
ilUserSettingsConfig $user_settings_config
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 getTranslationForField (string $fieldName, array $properties)
 
 checkUserManipulationAccessBool ()
 Check if current user has access to manipulate user data. More...
 
 initUserRoleAssignmentForm (string $xml_file_full_path)
 
 handleUploadedFiles ()
 Handles uploaded zip/xmp files with Filesystem implementation. More...
 
 getPasswordPolicySettingsMap (\ilSecuritySettings $security)
 
 collectChangedFields ()
 
 initLoginSettingsForm ()
 
 redirectAfterImport ()
 
 raiseErrorOnMissingWrite ()
 

Private Attributes

Container $dic
 
bool $usrFieldChangeListenersAccepted = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjUserFolderGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference 
)

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilLoggerFactory\getLogger(), and ILIAS\Repository\lng().

65  {
66  global $DIC;
67 
68  $this->dic = $DIC;
69  $ilCtrl = $DIC['ilCtrl'];
70 
71  $this->type = "usrf";
73  $a_data,
74  $a_id,
75  $a_call_by_reference,
76  false
77  );
78 
79  $this->lng->loadLanguageModule('search');
80  $this->lng->loadLanguageModule("user");
81  $this->lng->loadLanguageModule('tos');
82  $ilCtrl->saveParameter(
83  $this,
84  "letter"
85  );
86 
87  $this->user_request = new \ILIAS\User\StandardGUIRequest(
88  $DIC->http(),
89  $DIC->refinery()
90  );
91 
92  $this->selected_action = $this->user_request->getSelectedAction();
93  $this->user_settings_config = new ilUserSettingsConfig();
94 
95  $this->log = ilLoggerFactory::getLogger("user");
96  $this->requested_ids = $this->user_request->getIds();
97  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ __buildUserFilterSelect()

ilObjUserFolderGUI::__buildUserFilterSelect ( )

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

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

References ilLegacyFormElementsUtil\formSelect(), ilSession\get(), and ILIAS\Repository\lng().

2975  : string
2976  {
2977  $action[-1] = $this->lng->txt('all_users');
2978  $action[1] = $this->lng->txt('usr_active_only');
2979  $action[0] = $this->lng->txt('usr_inactive_only');
2980  $action[2] = $this->lng->txt('usr_limited_access_only');
2981  $action[3] = $this->lng->txt('usr_without_courses');
2982  $action[4] = $this->lng->txt('usr_filter_lastlogin');
2983  $action[5] = $this->lng->txt("usr_filter_coursemember");
2984  $action[6] = $this->lng->txt("usr_filter_groupmember");
2985  $action[7] = $this->lng->txt("usr_filter_role");
2986 
2988  ilSession::get("user_filter"),
2989  "user_filter",
2990  $action,
2991  false,
2992  true
2993  );
2994  }
static get(string $a_var)
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
+ Here is the call graph for this function:

◆ _goto()

static ilObjUserFolderGUI::_goto ( int  $a_user)
static

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

References ilObjectGUI\$ctrl, $DIC, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilCtrl\redirectToURL(), ROOT_FOLDER_ID, ilLanguage\txt(), and USER_FOLDER_ID.

3694  : void
3695  {
3696  global $DIC;
3697  $main_tpl = $DIC->ui()->mainTemplate();
3698 
3699  $ilAccess = $DIC['ilAccess'];
3700  $ilErr = $DIC['ilErr'];
3701  $lng = $DIC['lng'];
3702  $ctrl = $DIC['ilCtrl'];
3703 
3704  $a_target = USER_FOLDER_ID;
3705 
3706  if ($ilAccess->checkAccess(
3707  "read",
3708  "",
3709  $a_target
3710  )) {
3711  $ctrl->redirectToURL("ilias.php?baseClass=ilAdministrationGUI&ref_id=" . $a_target . "&jmpToUser=" . $a_user);
3712  exit;
3713  } else {
3714  if ($ilAccess->checkAccess(
3715  "read",
3716  "",
3718  )) {
3719  $main_tpl->setOnScreenMessage('failure', sprintf(
3720  $lng->txt("msg_no_perm_read_item"),
3722  ), true);
3724  }
3725  }
3726  $ilErr->raiseError(
3727  $lng->txt("msg_no_perm_read"),
3728  $ilErr->FATAL
3729  );
3730  }
exit
Definition: login.php:28
const USER_FOLDER_ID
Definition: constants.php:33
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
$ilErr
Definition: raiseError.php:17
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
redirectToURL(string $target_url)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ activateUsersObject()

ilObjUserFolderGUI::activateUsersObject ( )

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

References raiseErrorOnMissingWrite(), and showActionConfirmation().

1005  : void
1006  {
1007  $this->raiseErrorOnMissingWrite();
1008  $this->showActionConfirmation('activate');
1009  }
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ addToClipboardObject()

ilObjUserFolderGUI::addToClipboardObject ( )
protected

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

References $GLOBALS, ILIAS\Repository\ctrl(), getActionUserIds(), ILIAS\Survey\Mode\getId(), ilUserClipboard\getInstance(), and ILIAS\Repository\lng().

Referenced by showActionConfirmation().

4116  : void
4117  {
4118  $users = $this->getActionUserIds();
4119  if (!count($users)) {
4120  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
4121  $this->ctrl->redirect(
4122  $this,
4123  'view'
4124  );
4125  }
4126  $clip = ilUserClipboard::getInstance($GLOBALS['DIC']['ilUser']->getId());
4127  $clip->add($users);
4128  $clip->save();
4129 
4130  $this->tpl->setOnScreenMessage('success', $this->lng->txt('clipboard_user_added'), true);
4131  $this->ctrl->redirect(
4132  $this,
4133  'view'
4134  );
4135  }
getActionUserIds()
Get selected items for table action.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstance(int $a_usr_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilObjUserFolderGUI::addToExternalSettingsForm ( int  $a_form_id)

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

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

4040  : array // Missing array type.
4041  {
4042  global $DIC;
4043 
4044  switch ($a_form_id) {
4046  $security = ilSecuritySettings::_getInstance();
4047 
4048  $fields = [];
4049 
4050  $subitems = array(
4051  'ps_password_change_on_first_login_enabled' => array($security->isPasswordChangeOnFirstLoginEnabled(),
4053  ),
4054  'ps_password_must_not_contain_loginame' => array($security->getPasswordMustNotContainLoginnameStatus(
4055  ),
4057  ),
4058  'ps_password_chars_and_numbers_enabled' => array($security->isPasswordCharsAndNumbersEnabled(),
4060  ),
4061  'ps_password_special_chars_enabled' => array($security->isPasswordSpecialCharsEnabled(),
4063  ),
4064  'ps_password_min_length' => $security->getPasswordMinLength(),
4065  'ps_password_max_length' => $security->getPasswordMaxLength(),
4066  'ps_password_uppercase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
4067  'ps_password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
4068  'ps_password_max_age' => $security->getPasswordMaxAge()
4069  );
4070  $fields['ps_password_settings'] = array(null, null, $subitems);
4071 
4072  $subitems = array(
4073  'ps_login_max_attempts' => $security->getLoginMaxAttempts(),
4074  'ps_prevent_simultaneous_logins' => array($security->isPreventionOfSimultaneousLoginsEnabled(),
4076  )
4077  );
4078  $fields['ps_security_protection'] = array(null, null, $subitems);
4079 
4080  return array(array("generalSettings", $fields));
4081 
4083  return [
4084  [
4085  'generalSettings',
4086  [
4087  'tos_withdrawal_usr_deletion' => [
4088  (bool) $DIC->settings()->get(
4089  'tos_withdrawal_usr_deletion',
4090  '0'
4091  ),
4093  ],
4094  ]
4095  ],
4096  ];
4097  }
4098  return [];
4099  }
global $DIC
Definition: feed.php:28
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 376 of file class.ilObjUserFolderGUI.php.

References exit, and ilUserAutoComplete\MAX_ENTRIES.

376  : void
377  {
378  $auto = new ilUserAutoComplete();
379  $auto->addUserAccessFilterCallable(\Closure::fromCallable([$this, 'filterUserIdsByRbacOrPositionOfCurrentUser']));
380  // [$this, 'filterUserIdsByRbacOrPositionOfCurrentUser']);
381  $auto->setSearchFields(array('login', 'firstname', 'lastname', 'email', 'second_email'));
382  $auto->enableFieldSearchableCheck(false);
383  $auto->setMoreLinkAvailable(true);
384 
385  if ($this->user_request->getFetchAll()) {
386  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
387  }
388 
389  echo $auto->getList($this->user_request->getTerm());
390  exit();
391  }
exit
Definition: login.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ addUserObject()

ilObjUserFolderGUI::addUserObject ( )

Add new user.

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

References ILIAS\Repository\ctrl().

249  : void
250  {
251  $this->ctrl->setParameterByClass(
252  "ilobjusergui",
253  "new_type",
254  "usr"
255  );
256  $this->ctrl->redirectByClass(
257  array("iladministrationgui", "ilobjusergui"),
258  "create"
259  );
260  }
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjUserFolderGUI::applyFilterObject ( )

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

References $DIC, and ilObjectGUI\viewObject().

262  : void
263  {
264  global $DIC;
265 
266  $ilTabs = $DIC['ilTabs'];
267  $utab = new ilUserTableGUI(
268  $this,
269  "view"
270  );
271  $utab->resetOffset();
272  $utab->writeFilterToSession();
273  $this->viewObject();
274  $ilTabs->activateTab("usrf");
275  }
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ askForUserPasswordResetObject()

ilObjUserFolderGUI::askForUserPasswordResetObject ( )
protected

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

2143  : void
2144  {
2145  $this->lng->loadLanguageModule('ps');
2146 
2147  $confirmation = new \ilConfirmationGUI();
2148  $confirmation->setFormAction(
2149  $this->ctrl->getFormAction(
2150  $this,
2151  'askForUserPasswordReset'
2152  )
2153  );
2154  $confirmation->setHeaderText($this->lng->txt('ps_passwd_policy_changed_force_user_reset'));
2155  $confirmation->setConfirm(
2156  $this->lng->txt('yes'),
2157  'forceUserPasswordReset'
2158  );
2159  $confirmation->setCancel(
2160  $this->lng->txt('no'),
2161  'generalSettings'
2162  );
2163 
2164  $this->tpl->setContent($confirmation->getHTML());
2165  }
+ Here is the call graph for this function:

◆ cancelDeleteExportFileObject()

ilObjUserFolderGUI::cancelDeleteExportFileObject ( )

cancel deletion of export files

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

References ILIAS\Repository\ctrl().

3069  : void
3070  {
3071  $this->ctrl->redirectByClass(
3072  "ilobjuserfoldergui",
3073  "export"
3074  );
3075  }
+ Here is the call graph for this function:

◆ cancelNewAccountMailObject()

ilObjUserFolderGUI::cancelNewAccountMailObject ( )

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

References ILIAS\Repository\ctrl().

3357  : void
3358  {
3359  $this->ctrl->redirect(
3360  $this,
3361  "settings"
3362  );
3363  }
+ Here is the call graph for this function:

◆ cancelSearchActionObject()

ilObjUserFolderGUI::cancelSearchActionObject ( )

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

References ILIAS\Repository\ctrl().

490  : void
491  {
492  $this->ctrl->redirectByClass(
493  'ilrepositorysearchgui',
494  'showSearchResults'
495  );
496  }
+ Here is the call graph for this function:

◆ cancelUserFolderActionObject()

ilObjUserFolderGUI::cancelUserFolderActionObject ( )

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

References ILIAS\Repository\ctrl().

482  : void
483  {
484  $this->ctrl->redirect(
485  $this,
486  'view'
487  );
488  }
+ Here is the call graph for this function:

◆ checkUserManipulationAccessBool()

ilObjUserFolderGUI::checkUserManipulationAccessBool ( )
private

Check if current user has access to manipulate user data.

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

References ilObjectGUI\$access, $DIC, ilOrgUnitPositionAndRBACAccessHandler\checkRbacOrPositionPermissionAccess(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

Referenced by confirmaccessFreeObject(), confirmaccessRestrictObject(), confirmactivateObject(), confirmdeactivateObject(), usrExportCsvObject(), usrExportX86Object(), and usrExportXmlObject().

869  : bool
870  {
871  global $DIC;
872 
873  $access = $DIC->access();
875  'write',
878  );
879  }
const USER_FOLDER_ID
Definition: constants.php:33
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
global $DIC
Definition: feed.php:28
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chooseLetterObject()

ilObjUserFolderGUI::chooseLetterObject ( )

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

References $DIC.

409  : void
410  {
411  global $DIC;
412 
413  $ilCtrl = $DIC['ilCtrl'];
414 
415  $ilCtrl->redirect(
416  $this,
417  "view"
418  );
419  }
global $DIC
Definition: feed.php:28

◆ collectChangedFields()

ilObjUserFolderGUI::collectChangedFields ( )
private
Returns
array<string, ChangedUserFieldAttribute>

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

References ILIAS\LTI\ToolProvider\$key, and $post.

Referenced by saveGlobalUserSettingsObject().

2940  : array
2941  {
2942  $changedFields = [];
2943  $post = $this->dic->http()->request()->getParsedBody();
2944  if (
2945  !isset($post["chb"])
2946  && !is_array($post["chb"])
2947  && !isset($post["current"])
2948  && !is_array($post["current"])
2949  ) {
2950  return $changedFields;
2951  }
2952 
2953  $old = $post["current"];
2954  $new = $post["chb"];
2955 
2956  foreach ($old as $key => $oldValue) {
2957  if (!isset($new[$key])) {
2958  $isBoolean = filter_var($oldValue, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
2959  $new[$key] = $isBoolean ? "0" : $oldValue;
2960  }
2961  }
2962 
2963  $oldToNewDiff = array_diff_assoc($old, $new);
2964 
2965  foreach ($oldToNewDiff as $key => $oldValue) {
2966  $changedFields[$key] = new ChangedUserFieldAttribute($key, $oldValue, $new[$key]);
2967  }
2968 
2969  return $changedFields;
2970  }
string $key
Consumer key/client ID value.
Definition: System.php:193
$post
Definition: ltitoken.php:49
+ Here is the caller graph for this function:

◆ confirmaccessFreeObject()

ilObjUserFolderGUI::confirmaccessFreeObject ( )
protected

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

References ilObjectGUI\$id, checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), getActionUserIds(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

593  : void
594  {
595  if (!$this->checkUserManipulationAccessBool()) {
596  $this->ilias->raiseError(
597  $this->lng->txt("msg_no_perm_write"),
598  $this->ilias->error_obj->WARNING
599  );
600  }
601 
602  foreach ($this->getActionUserIds() as $id) {
604  $id,
605  false
606  );
607  if ($obj instanceof \ilObjUser) {
608  $obj->setTimeLimitUnlimited(true);
609  $obj->setTimeLimitFrom(null);
610  $obj->setTimeLimitUntil(null);
611  $obj->setTimeLimitMessage("");
612  $obj->update();
613  }
614  }
615 
616  // Feedback
617  $this->tpl->setOnScreenMessage('success', $this->lng->txt("access_free_granted"), true);
618 
619  if ($this->user_request->getFrSearch()) {
620  $this->ctrl->redirectByClass(
621  'ilRepositorySearchGUI',
622  'show'
623  );
624  } else {
625  $this->ctrl->redirect(
626  $this,
627  "view"
628  );
629  }
630  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
getActionUserIds()
Get selected items for table action.
header include for all ilias files.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ confirmaccessRestrictObject()

ilObjUserFolderGUI::confirmaccessRestrictObject ( )
protected
Exceptions
ilCtrlException
ilDatabaseException
ilObjectNotFoundException

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

References ilObjectGUI\$id, ilPropertyFormGUI\checkInput(), checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), getActionUserIds(), ilObjectFactory\getInstanceByObjId(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, initAccessRestrictionForm(), ILIAS\Repository\lng(), and setAccessRestrictionObject().

710  : bool
711  {
712  $form = $this->initAccessRestrictionForm();
713  if (!$form->checkInput()) {
714  return $this->setAccessRestrictionObject($form);
715  }
716 
717  $timefrom = $form->getItemByPostVar("from")->getDate()->get(IL_CAL_UNIX);
718  $timeuntil = $form->getItemByPostVar("to")->getDate()->get(IL_CAL_UNIX);
719  if ($timeuntil <= $timefrom) {
720  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("time_limit_not_valid"));
721  return $this->setAccessRestrictionObject($form);
722  }
723 
724  if (!$this->checkUserManipulationAccessBool()) {
725  $this->ilias->raiseError(
726  $this->lng->txt("msg_no_perm_write"),
727  $this->ilias->error_obj->WARNING
728  );
729  }
730  foreach ($this->getActionUserIds() as $id) {
732  $id,
733  false
734  );
735  if ($obj instanceof \ilObjUser) {
736  $obj->setTimeLimitUnlimited(0);
737  $obj->setTimeLimitFrom((int) $timefrom);
738  $obj->setTimeLimitUntil((int) $timeuntil);
739  $obj->setTimeLimitMessage("");
740  $obj->update();
741  }
742  }
743  $this->tpl->setOnScreenMessage('success', $this->lng->txt("access_restricted"), true);
744 
745  if ($this->user_request->getFrSearch()) {
746  $this->ctrl->redirectByClass(
747  'ilRepositorySearchGUI',
748  'show'
749  );
750  } else {
751  $this->ctrl->redirect(
752  $this,
753  "view"
754  );
755  }
756  return false;
757  }
getItemByPostVar(string $a_post_var)
const IL_CAL_UNIX
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
getActionUserIds()
Get selected items for table action.
header include for all ilias files.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
initAccessRestrictionForm(bool $a_from_search=false)
setAccessRestrictionObject(?ilPropertyFormGUI $a_form=null, bool $a_from_search=false)
+ Here is the call graph for this function:

◆ confirmactivateObject()

ilObjUserFolderGUI::confirmactivateObject ( )

Set the selected users active.

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

References $DIC, ilObjectGUI\$id, $ilUser, checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), getActionUserIds(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

501  : void
502  {
503  global $DIC;
504 
505  $ilUser = $DIC['ilUser'];
506 
507  if (!$this->checkUserManipulationAccessBool()) {
508  $this->ilias->raiseError(
509  $this->lng->txt("msg_no_perm_write"),
510  $this->ilias->error_obj->WARNING
511  );
512  }
513 
514  // FOR ALL SELECTED OBJECTS
515  foreach ($this->getActionUserIds() as $id) {
517  $id,
518  false
519  );
520  if ($obj instanceof \ilObjUser) {
521  if (!$obj->getActive()) {
522  $obj->setLoginAttempts(0);
523  }
524  $obj->setActive(
525  true,
526  $ilUser->getId()
527  );
528  $obj->update();
529  }
530  }
531 
532  $this->tpl->setOnScreenMessage('success', $this->lng->txt("user_activated"), true);
533 
534  if ($this->user_request->getFrSearch()) {
535  $this->ctrl->redirectByClass(
536  'ilRepositorySearchGUI',
537  'show'
538  );
539  } else {
540  $this->ctrl->redirect(
541  $this,
542  "view"
543  );
544  }
545  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
getActionUserIds()
Get selected items for table action.
global $DIC
Definition: feed.php:28
header include for all ilias files.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ confirmdeactivateObject()

ilObjUserFolderGUI::confirmdeactivateObject ( )

Set the selected users inactive.

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

References $DIC, ilObjectGUI\$id, $ilUser, checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), getActionUserIds(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

550  : void
551  {
552  global $DIC;
553 
554  $ilUser = $DIC['ilUser'];
555 
556  if (!$this->checkUserManipulationAccessBool()) {
557  $this->ilias->raiseError(
558  $this->lng->txt("msg_no_perm_write"),
559  $this->ilias->error_obj->WARNING
560  );
561  }
562  // FOR ALL SELECTED OBJECTS
563  foreach ($this->getActionUserIds() as $id) {
565  $id,
566  false
567  );
568  if ($obj instanceof \ilObjUser) {
569  $obj->setActive(
570  false,
571  $ilUser->getId()
572  );
573  $obj->update();
574  }
575  }
576 
577  // Feedback
578  $this->tpl->setOnScreenMessage('success', $this->lng->txt("user_deactivated"), true);
579 
580  if ($this->user_request->getFrSearch()) {
581  $this->ctrl->redirectByClass(
582  'ilRepositorySearchGUI',
583  'show'
584  );
585  } else {
586  $this->ctrl->redirect(
587  $this,
588  "view"
589  );
590  }
591  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
getActionUserIds()
Get selected items for table action.
global $DIC
Definition: feed.php:28
header include for all ilias files.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ confirmDeleteExportFileObject()

ilObjUserFolderGUI::confirmDeleteExportFileObject ( )

confirmation screen for export file deletion

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

References ilObject\_getIcon(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

3029  : void
3030  {
3031  $files = $this->user_request->getFiles();
3032  if (count($files) == 0) {
3033  $this->ilias->raiseError(
3034  $this->lng->txt("no_checkbox"),
3035  $this->ilias->error_obj->MESSAGE
3036  );
3037  }
3038 
3039  // display confirmation message
3040  $cgui = new ilConfirmationGUI();
3041  $cgui->setFormAction($this->ctrl->getFormAction($this));
3042  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
3043  $cgui->setCancel(
3044  $this->lng->txt("cancel"),
3045  "cancelDeleteExportFile"
3046  );
3047  $cgui->setConfirm(
3048  $this->lng->txt("confirm"),
3049  "deleteExportFile"
3050  );
3051 
3052  // BEGIN TABLE DATA
3053  foreach ($files as $file) {
3054  $cgui->addItem(
3055  "file[]",
3056  $file,
3057  $file,
3058  ilObject::_getIcon($this->object->getId()),
3059  $this->lng->txt("obj_usrf")
3060  );
3061  }
3062 
3063  $this->tpl->setContent($cgui->getHTML());
3064  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
header include for all ilias files.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmdeleteObject()

ilObjUserFolderGUI::confirmdeleteObject ( )

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

References $DIC, ilObjectGUI\$id, $ilUser, ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

759  : void
760  {
761  global $DIC;
762 
763  $rbacsystem = $DIC['rbacsystem'];
764  $ilCtrl = $DIC['ilCtrl'];
765  $ilUser = $DIC['ilUser'];
766 
767  // FOR NON_REF_OBJECTS WE CHECK ACCESS ONLY OF PARENT OBJECT ONCE
768  if (!$rbacsystem->checkAccess(
769  'delete',
770  $this->object->getRefId()
771  )) {
772  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_delete"), true);
773  $ilCtrl->redirect(
774  $this,
775  "view"
776  );
777  }
778 
779  $ids = $this->user_request->getIds();
780  if (in_array(
781  $ilUser->getId(),
782  $ids
783  )) {
784  $this->ilias->raiseError(
785  $this->lng->txt("msg_no_delete_yourself"),
786  $this->ilias->error_obj->WARNING
787  );
788  }
789 
790  // FOR ALL SELECTED OBJECTS
791  foreach ($ids as $id) {
792  // instatiate correct object class (usr)
794  $obj->delete();
795  }
796 
797  // Feedback
798  $this->tpl->setOnScreenMessage('success', $this->lng->txt("user_deleted"), true);
799 
800  if ($this->user_request->getFrSearch()) {
801  $this->ctrl->redirectByClass(
802  'ilRepositorySearchGUI',
803  'show'
804  );
805  } else {
806  $this->ctrl->redirect(
807  $this,
808  "view"
809  );
810  }
811  }
global $DIC
Definition: feed.php:28
header include for all ilias files.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ confirmSavedObject()

ilObjUserFolderGUI::confirmSavedObject ( )

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

References raiseErrorOnMissingWrite(), and saveGlobalUserSettingsObject().

Referenced by confirmUsrFieldChangeListenersObject().

2585  : void
2586  {
2587  $this->raiseErrorOnMissingWrite();
2588  $this->saveGlobalUserSettingsObject('save');
2589  }
saveGlobalUserSettingsObject(string $action="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmUsrFieldChangeListenersObject()

ilObjUserFolderGUI::confirmUsrFieldChangeListenersObject ( )

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

References confirmSavedObject().

2817  : void
2818  {
2819  $this->usrFieldChangeListenersAccepted = true;
2820  $this->confirmSavedObject();
2821  }
+ Here is the call graph for this function:

◆ deactivateUsersObject()

ilObjUserFolderGUI::deactivateUsersObject ( )

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

References getActionUserIds(), ILIAS\Repository\lng(), raiseErrorOnMissingWrite(), showActionConfirmation(), ILIAS\Repository\user(), and ilObjectGUI\viewObject().

1011  : void
1012  {
1013  $this->raiseErrorOnMissingWrite();
1014  if (in_array($this->user->getId(), $this->getActionUserIds())) {
1015  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_deactivate_yourself'));
1016  $this->viewObject();
1017  return;
1018  }
1019  $this->showActionConfirmation("deactivate");
1020  }
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
getActionUserIds()
Get selected items for table action.
+ Here is the call graph for this function:

◆ deleteExportFileObject()

ilObjUserFolderGUI::deleteExportFileObject ( )

delete export files

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

References ILIAS\Repository\ctrl(), and raiseErrorOnMissingWrite().

3080  : void
3081  {
3082  $this->raiseErrorOnMissingWrite();
3083  $files = $this->user_request->getFiles();
3084  $export_dir = $this->object->getExportDirectory();
3085  foreach ($files as $file) {
3086  $file = basename($file);
3087 
3088  $exp_file = $export_dir . "/" . $file;
3089  if (is_file($exp_file)) {
3090  unlink($exp_file);
3091  }
3092  }
3093  $this->ctrl->redirectByClass(
3094  "ilobjuserfoldergui",
3095  "export"
3096  );
3097  }
+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjUserFolderGUI::deleteUsersObject ( )

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

References ILIAS\Repository\access(), getActionUserIds(), ILIAS\Repository\lng(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, showActionConfirmation(), ILIAS\Repository\user(), USER_FOLDER_ID, and ilObjectGUI\viewObject().

984  : void
985  {
986  if (!$this->access->checkRbacOrPositionPermissionAccess(
987  'delete',
990  )) {
991  $this->ilias->raiseError(
992  $this->lng->txt('permission_denied'),
993  $this->ilias->error_obj->MESSAGE
994  );
995  }
996 
997  if (in_array($this->user->getId(), $this->getActionUserIds())) {
998  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_delete_yourself'));
999  $this->viewObject();
1000  return;
1001  }
1002  $this->showActionConfirmation("delete");
1003  }
const USER_FOLDER_ID
Definition: constants.php:33
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
getActionUserIds()
Get selected items for table action.
header include for all ilias files.
+ 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 3000 of file class.ilObjUserFolderGUI.php.

References ilFileDelivery\deliverFileLegacy(), and ILIAS\Repository\lng().

3000  : void
3001  {
3002  $files = $this->user_request->getFiles();
3003  if (count($files) == 0) {
3004  $this->ilias->raiseError(
3005  $this->lng->txt("no_checkbox"),
3006  $this->ilias->error_obj->MESSAGE
3007  );
3008  }
3009 
3010  if (count($files) > 1) {
3011  $this->ilias->raiseError(
3012  $this->lng->txt("select_max_one_item"),
3013  $this->ilias->error_obj->MESSAGE
3014  );
3015  }
3016 
3017  $file = basename($files[0]);
3018 
3019  $export_dir = $this->object->getExportDirectory();
3021  $export_dir . "/" . $file,
3022  $file
3023  );
3024  }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
header include for all ilias files.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjUserFolderGUI::executeCommand ( )

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

References ilObjectGUI\$access, $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getUserMultiCommands(), ILIAS\Repository\lng(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, ilObjectGUI\prepareOutput(), raiseErrorOnMissingWrite(), setSubTabs(), and USER_FOLDER_ID.

127  : void
128  {
129  global $DIC;
130 
131  $ilTabs = $DIC->tabs();
132  $access = $DIC->access();
133 
134  $next_class = $this->ctrl->getNextClass($this);
135  $cmd = $this->ctrl->getCmd();
136  $this->prepareOutput();
137 
138  switch ($next_class) {
139  case 'ilusertablegui':
140  $u_table = new ilUserTableGUI(
141  $this,
142  "view"
143  );
144  $u_table->initFilter();
145  $this->ctrl->setReturn(
146  $this,
147  'view'
148  );
149  $this->ctrl->forwardCommand($u_table);
150  break;
151 
152  case 'ilpermissiongui':
153  $perm_gui = new ilPermissionGUI($this);
154  $this->ctrl->forwardCommand($perm_gui);
155  break;
156 
157  case 'ilrepositorysearchgui':
158  if (!$this->access->checkRbacOrPositionPermissionAccess(
159  'read_users',
162  )) {
163  $this->ilias->raiseError(
164  $this->lng->txt("permission_denied"),
165  $this->ilias->error_obj->MESSAGE
166  );
167  }
168 
169  $user_search = new ilRepositorySearchGUI();
170  $user_search->setTitle($this->lng->txt("search_user_extended")); // #17502
171  $user_search->enableSearchableCheck(false);
172  $user_search->setUserLimitations(false);
173  $user_search->setCallback(
174  $this,
175  'searchResultHandler',
176  $this->getUserMultiCommands(true)
177  );
178  $user_search->addUserAccessFilterCallable(array($this, "searchUserAccessFilterCallable"));
179  $this->tabs_gui->setTabActive('search_user_extended');
180  $this->ctrl->setReturn(
181  $this,
182  'view'
183  );
184  $this->ctrl->forwardCommand($user_search);
185  break;
186 
187  case 'ilaccountcodesgui':
188  $this->tabs_gui->setTabActive('settings');
189  $this->setSubTabs("settings");
190  $ilTabs->activateSubTab("account_codes");
191  $acc = new ilAccountCodesGUI($this->ref_id);
192  $this->ctrl->forwardCommand($acc);
193  break;
194 
195  case 'ilcustomuserfieldsgui':
196  $this->raiseErrorOnMissingWrite();
197  $this->tabs_gui->setTabActive('settings');
198  $this->setSubTabs("settings");
199  $ilTabs->activateSubTab("user_defined_fields");
200  $cf = new ilCustomUserFieldsGUI(
201  $this->requested_ref_id,
202  $this->user_request->getFieldId()
203  );
204  $this->ctrl->forwardCommand($cf);
205  break;
206 
207  case 'iluserstartingpointgui':
208  $this->raiseErrorOnMissingWrite();
209  $this->tabs_gui->setTabActive('settings');
210  $this->setSubTabs("settings");
211  $ilTabs->activateSubTab("starting_points");
212  $cf = new ilUserStartingPointGUI($this->ref_id);
213  $this->ctrl->forwardCommand($cf);
214  break;
215 
216  case 'iluserprofileinfosettingsgui':
217  $this->raiseErrorOnMissingWrite();
218  $this->tabs_gui->setTabActive('settings');
219  $this->setSubTabs("settings");
220  $ilTabs->activateSubTab("user_profile_info");
221  $ps = new ilUserProfileInfoSettingsGUI();
222  $this->ctrl->forwardCommand($ps);
223  break;
224 
225  default:
226  if (!$cmd) {
227  $cmd = "view";
228  }
229  $cmd .= "Object";
230  $this->$cmd();
231  break;
232  }
233  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const USER_FOLDER_ID
Definition: constants.php:33
prepareOutput(bool $show_sub_objects=true)
getUserMultiCommands(bool $a_search_form=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
header include for all ilias files.
ilAccessHandler $access
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ exportObject()

ilObjUserFolderGUI::exportObject ( )

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

References $DIC, ilObjectGUI\$toolbar, ilObjectGUI\$type, ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addInputItem(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilSubmitButton\getInstance(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilToolbarGUI\setFormAction().

3114  : void
3115  {
3116  global $DIC;
3117 
3118  $this->checkPermission("write,read_users");
3119 
3120  $button = ilSubmitButton::getInstance();
3121  $button->setCaption('create_export_file');
3122  $button->setCommand('performExport');
3123  $toolbar = $DIC->toolbar();
3124  $toolbar->setFormAction($this->ctrl->getFormAction($this));
3125 
3126  $export_types = array(
3127  "userfolder_export_excel_x86",
3128  "userfolder_export_csv",
3129  "userfolder_export_xml"
3130  );
3131  $options = [];
3132  foreach ($export_types as $type) {
3133  $options[$type] = $this->lng->txt($type);
3134  }
3135  $type_selection = new \ilSelectInputGUI(
3136  '',
3137  'export_type'
3138  );
3139  $type_selection->setOptions($options);
3140 
3142  $type_selection,
3143  true
3144  );
3145  $toolbar->addButtonInstance($button);
3146 
3147  $table = new \ilUserExportFileTableGUI(
3148  $this,
3149  'export'
3150  );
3151  $table->init();
3152  $table->parse($this->object->getExportFiles());
3153 
3154  $this->tpl->setContent($table->getHTML());
3155  }
setFormAction(string $a_val, bool $a_multipart=false, string $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
addButtonInstance(ilButtonBase $a_button)
Add button instance.
global $DIC
Definition: feed.php:28
ilToolbarGUI $toolbar
addInputItem(ilToolbarItem $a_item, bool $a_output_label=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ filterUserIdsByRbacOrPositionOfCurrentUser()

ilObjUserFolderGUI::filterUserIdsByRbacOrPositionOfCurrentUser ( array  $user_ids)
Parameters
int[]$user_ids

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

References ilObjectGUI\$access, $DIC, ilOrgUnitPositionAndRBACAccessHandler\filterUserIdsByRbacOrPositionOfCurrentUser(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

396  : array
397  {
398  global $DIC;
399 
400  $access = $DIC->access();
402  'read_users',
405  $user_ids
406  );
407  }
const USER_FOLDER_ID
Definition: constants.php:33
global $DIC
Definition: feed.php:28
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ forceUserPasswordResetObject()

ilObjUserFolderGUI::forceUserPasswordResetObject ( )
protected

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

References ILIAS\Repository\ctrl(), ilUserPasswordManager\getInstance(), and ILIAS\Repository\lng().

2131  : void
2132  {
2133  \ilUserPasswordManager::getInstance()->resetLastPasswordChangeForLocalUsers();
2134  $this->lng->loadLanguageModule('ps');
2135 
2136  $this->tpl->setOnScreenMessage('success', $this->lng->txt('ps_passwd_policy_change_force_user_reset_succ'), true);
2137  $this->ctrl->redirect(
2138  $this,
2139  'generalSettings'
2140  );
2141  }
static getInstance()
Singleton method to reduce footprint (included files, created instances)
+ Here is the call graph for this function:

◆ freeAccessObject()

ilObjUserFolderGUI::freeAccessObject ( )

Free access.

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

References raiseErrorOnMissingWrite(), and showActionConfirmation().

1031  : void
1032  {
1033  $this->raiseErrorOnMissingWrite();
1034  $this->showActionConfirmation('accessFree');
1035  }
showActionConfirmation(string $action, bool $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.

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

References $DIC, $ilSetting, ilObjectGUI\$settings, ilSecuritySettings\_getInstance(), ilSessionControl\DEFAULT_MAX_COUNT, ilSessionControl\DEFAULT_MAX_IDLE, ilSessionControl\DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST, ilSessionControl\DEFAULT_MIN_IDLE, ILIAS\Repository\form(), ilUserAccountSettings\getInstance(), getPasswordPolicySettingsMap(), initFormGeneralSettings(), ILIAS\Repository\int(), raiseErrorOnMissingWrite(), and ilSession\SESSION_HANDLING_FIXED.

1850  : void
1851  {
1852  global $DIC;
1853 
1854  $ilSetting = $DIC['ilSetting'];
1855 
1856  $this->raiseErrorOnMissingWrite();
1857  $this->initFormGeneralSettings();
1858 
1860 
1861  $show_blocking_time_in_days = $ilSetting->get('loginname_change_blocking_time') / 86400;
1862  $show_blocking_time_in_days = (float) $show_blocking_time_in_days;
1863 
1864  $security = ilSecuritySettings::_getInstance();
1865 
1866  $settings = [
1867  'lua' => $aset->isLocalUserAdministrationEnabled(),
1868  'lrua' => $aset->isUserAccessRestricted(),
1869  'allow_change_loginname' => (bool) $ilSetting->get('allow_change_loginname'),
1870  'create_history_loginname' => (bool) $ilSetting->get('create_history_loginname'),
1871  'reuse_of_loginnames' => (bool) $ilSetting->get('reuse_of_loginnames'),
1872  'loginname_change_blocking_time' => $show_blocking_time_in_days,
1873  'user_adm_alpha_nav' => (int) $ilSetting->get('user_adm_alpha_nav'),
1874  // 'user_ext_profiles' => (int)$ilSetting->get('user_ext_profiles')
1875  'user_reactivate_code' => (int) $ilSetting->get('user_reactivate_code'),
1876  'user_own_account' => (int) $ilSetting->get('user_delete_own_account'),
1877  'user_own_account_email' => $ilSetting->get('user_delete_own_account_email'),
1878  'tos_withdrawal_usr_deletion' => (bool) $ilSetting->get('tos_withdrawal_usr_deletion'),
1879 
1880  'session_handling_type' => $ilSetting->get(
1881  'session_handling_type',
1883  ),
1884  'session_reminder_enabled' => $ilSetting->get('session_reminder_enabled'),
1885  'session_max_count' => $ilSetting->get(
1886  'session_max_count',
1888  ),
1889  'session_min_idle' => $ilSetting->get(
1890  'session_min_idle',
1892  ),
1893  'session_max_idle' => $ilSetting->get(
1894  'session_max_idle',
1896  ),
1897  'session_max_idle_after_first_request' => $ilSetting->get(
1898  'session_max_idle_after_first_request',
1900  ),
1901 
1902  'login_max_attempts' => $security->getLoginMaxAttempts(),
1903  'ps_prevent_simultaneous_logins' => (int) $security->isPreventionOfSimultaneousLoginsEnabled(),
1904  'password_assistance' => (bool) $ilSetting->get("password_assistance"),
1905  'letter_avatars' => (int) $ilSetting->get('letter_avatars'),
1906  'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
1907  'password_max_age' => $security->getPasswordMaxAge()
1908  ];
1909 
1910  $passwordPolicySettings = $this->getPasswordPolicySettingsMap($security);
1911  $this->form->setValuesByArray(
1912  array_merge(
1913  $settings,
1914  $passwordPolicySettings,
1915  ['pw_policy_hash' => md5(
1916  implode(
1917  '',
1918  $passwordPolicySettings
1919  )
1920  )
1921  ]
1922  )
1923  );
1924 
1925  $this->tpl->setContent($this->form->getHTML());
1926  }
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet ...
initFormGeneralSettings()
init general settings form
getPasswordPolicySettingsMap(\ilSecuritySettings $security)
const SESSION_HANDLING_FIXED
global $DIC
Definition: feed.php:28
form( $class_path, string $cmd)
global $ilSetting
Definition: privfeed.php:17
static _getInstance()
Get instance of ilSecuritySettings.
ilSetting $settings
+ Here is the call graph for this function:

◆ getActionUserIds()

ilObjUserFolderGUI::getActionUserIds ( )
protected

Get selected items for table action.

Returns
int[]

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

References ilObjectGUI\$access, $DIC, ilLocalUser\_getAllUserIds(), ilLocalUser\_getUserFolderId(), ilRBACAccessHandler\checkAccess(), ilOrgUnitPositionAndRBACAccessHandler\checkRbacOrPositionPermissionAccess(), ilOrgUnitPositionAndRBACAccessHandler\filterUserIdsByRbacOrPositionOfCurrentUser(), ilUserTableGUI\MODE_USER_FOLDER, ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

Referenced by addToClipboardObject(), confirmaccessFreeObject(), confirmaccessRestrictObject(), confirmactivateObject(), confirmdeactivateObject(), deactivateUsersObject(), deleteUsersObject(), initAccessRestrictionForm(), mailObject(), showActionConfirmation(), usrExportCsvObject(), usrExportX86Object(), and usrExportXmlObject().

817  : array
818  {
819  global $DIC;
820  $access = $DIC->access();
821 
822  if ($this->getSelectAllPostArray()['select_cmd_all']) {
823  include_once("./Services/User/classes/class.ilUserTableGUI.php");
824  $utab = new ilUserTableGUI(
825  $this,
826  "view",
828  false
829  );
830 
831  if (!$access->checkAccess(
832  'read_users',
833  '',
835  ) &&
837  'read_users',
840  )) {
843  'read_users',
846  $users
847  );
848 
849  $utab->addFilterItemValue(
850  "user_ids",
851  $filtered_users
852  );
853  }
854 
855  return $utab->getUserIdsForFilter();
856  } else {
858  'read_users',
861  $this->requested_ids
862  );
863  }
864  }
static _getAllUserIds(int $a_filter=0)
const USER_FOLDER_ID
Definition: constants.php:33
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
static _getUserFolderId()
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjUserFolderGUI::getAdminTabs ( )

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

References getTabs().

3404  : void
3405  {
3406  $this->getTabs();
3407  }
+ Here is the call graph for this function:

◆ getImportDir()

ilObjUserFolderGUI::getImportDir ( )

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

References $DIC, and $ilUser.

Referenced by handleUploadedFiles(), importCancelledObject(), importUsersObject(), and verifyXmlData().

1137  : string
1138  {
1139  // For each user session a different directory must be used to prevent
1140  // that one user session overwrites the import data that another session
1141  // is currently importing.
1142  global $DIC;
1143 
1144  $ilUser = $DIC->user();
1145 
1146  $importDir = 'user_import/usr_' . $ilUser->getId() . '_' . mb_substr(session_id(), 0, 8);
1147 
1148  return $importDir;
1149  }
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
+ Here is the caller graph for this function:

◆ getPasswordPolicySettingsMap()

ilObjUserFolderGUI::getPasswordPolicySettingsMap ( \ilSecuritySettings  $security)
private

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

References ilSecuritySettings\getPasswordMaxLength(), ilSecuritySettings\getPasswordMinLength(), ilSecuritySettings\getPasswordMustNotContainLoginnameStatus(), ilSecuritySettings\getPasswordNumberOfLowercaseChars(), ilSecuritySettings\getPasswordNumberOfUppercaseChars(), ilSecuritySettings\isPasswordCharsAndNumbersEnabled(), and ilSecuritySettings\isPasswordSpecialCharsEnabled().

Referenced by generalSettingsObject(), and saveGeneralSettingsObject().

1928  : array // Missing array type.
1929  {
1930  return [
1931  'password_must_not_contain_loginame' => $security->getPasswordMustNotContainLoginnameStatus() ? 1 : 0,
1932  'password_chars_and_numbers_enabled' => $security->isPasswordCharsAndNumbersEnabled() ? 1 : 0,
1933  'password_special_chars_enabled' => $security->isPasswordSpecialCharsEnabled() ? 1 : 0,
1934  'password_min_length' => $security->getPasswordMinLength(),
1935  'password_max_length' => $security->getPasswordMaxLength(),
1936  'password_ucase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
1937  'password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
1938  ];
1939  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjUserFolderGUI::getTabs ( )
protected

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

References ilObjectGUI\$access, $DIC, ilOrgUnitPositionAndRBACAccessHandler\checkRbacOrPositionPermissionAccess(), ILIAS\Repository\ctrl(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

Referenced by getAdminTabs().

3409  : void
3410  {
3411  global $DIC;
3412 
3413  $rbacsystem = $DIC['rbacsystem'];
3414  $access = $DIC->access();
3415 
3416  if ($rbacsystem->checkAccess(
3417  "visible,read",
3418  $this->object->getRefId()
3419  )) {
3420  $this->tabs_gui->addTarget(
3421  "usrf",
3422  $this->ctrl->getLinkTarget(
3423  $this,
3424  "view"
3425  ),
3426  array("view", "delete", "resetFilter", "userAction", ""),
3427  "",
3428  ""
3429  );
3430  }
3431 
3433  "read_users",
3436  )) {
3437  $this->tabs_gui->addTarget(
3438  "search_user_extended",
3439  $this->ctrl->getLinkTargetByClass(
3440  'ilRepositorySearchGUI',
3441  ''
3442  ),
3443  [],
3444  "ilrepositorysearchgui",
3445  ""
3446  );
3447  }
3448 
3449  if ($rbacsystem->checkAccess(
3450  "write,read_users",
3451  $this->object->getRefId()
3452  )) {
3453  $this->tabs_gui->addTarget(
3454  "settings",
3455  $this->ctrl->getLinkTarget(
3456  $this,
3457  "generalSettings"
3458  ),
3459  array('askForUserPasswordReset',
3460  'forceUserPasswordReset',
3461  'settings',
3462  'generalSettings',
3463  'listUserDefinedField',
3464  'newAccountMail'
3465  )
3466  );
3467 
3468  $this->tabs_gui->addTarget(
3469  "export",
3470  $this->ctrl->getLinkTarget(
3471  $this,
3472  "export"
3473  ),
3474  "export",
3475  "",
3476  ""
3477  );
3478  }
3479 
3480  if ($rbacsystem->checkAccess(
3481  'edit_permission',
3482  $this->object->getRefId()
3483  )) {
3484  $this->tabs_gui->addTarget(
3485  "perm_settings",
3486  $this->ctrl->getLinkTargetByClass(
3487  array(get_class($this), 'ilpermissiongui'),
3488  "perm"
3489  ),
3490  array("perm", "info", "owner"),
3491  'ilpermissiongui'
3492  );
3493  }
3494  }
const USER_FOLDER_ID
Definition: constants.php:33
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
global $DIC
Definition: feed.php:28
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTranslationForField()

ilObjUserFolderGUI::getTranslationForField ( string  $fieldName,
array  $properties 
)
private

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

References ILIAS\Repository\lng().

Referenced by showFieldChangeComponentsListeningConfirmDialog().

102  : string {
103  $translation = (!isset($properties["lang_var"]) || $properties["lang_var"] === "")
104  ? $fieldName
105  : $properties["lang_var"];
106 
107  if ($fieldName === "country") {
108  $translation = "country_free_text";
109  }
110  if ($fieldName === "sel_country") {
111  $translation = "country_selection";
112  }
113 
114  return $this->lng->txt($translation);
115  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUserMultiCommands()

ilObjUserFolderGUI::getUserMultiCommands ( bool  $a_search_form = false)

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

References $DIC, $ilUser, ilObjectGUI\$type, and ILIAS\Repository\lng().

Referenced by executeCommand().

3797  : array // Missing array type.
3798  {
3799  global $DIC;
3800 
3801  $rbacsystem = $DIC['rbacsystem'];
3802  $ilUser = $DIC['ilUser'];
3803 
3804  $cmds = [];
3805  // see searchResultHandler()
3806  if ($a_search_form) {
3807  if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
3808  $cmds = [
3809  'activate' => $this->lng->txt('activate'),
3810  'deactivate' => $this->lng->txt('deactivate'),
3811  'accessRestrict' => $this->lng->txt('accessRestrict'),
3812  'accessFree' => $this->lng->txt('accessFree')
3813  ];
3814  }
3815 
3816  if ($rbacsystem->checkAccess('delete', $this->object->getRefId())) {
3817  $cmds["delete"] = $this->lng->txt("delete");
3818  }
3819  } // show confirmation
3820  else {
3821  if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
3822  $cmds = [
3823  'activateUsers' => $this->lng->txt('activate'),
3824  'deactivateUsers' => $this->lng->txt('deactivate'),
3825  'restrictAccess' => $this->lng->txt('accessRestrict'),
3826  'freeAccess' => $this->lng->txt('accessFree')
3827  ];
3828  }
3829 
3830  if ($rbacsystem->checkAccess('delete', $this->object->getRefId())) {
3831  $cmds["deleteUsers"] = $this->lng->txt("delete");
3832  }
3833  }
3834 
3835  if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
3836  $export_types = array("userfolder_export_excel_x86", "userfolder_export_csv", "userfolder_export_xml");
3837  foreach ($export_types as $type) {
3838  $cmd = explode(
3839  "_",
3840  $type
3841  );
3842  $cmd = array_pop($cmd);
3843  $cmds['usrExport' . ucfirst($cmd)] = $this->lng->txt('export') . ' - ' .
3844  $this->lng->txt($type);
3845  }
3846  }
3847 
3848  // check if current user may send mails
3849  $mail = new ilMail($ilUser->getId());
3850  if ($rbacsystem->checkAccess(
3851  'internal_mail',
3852  $mail->getMailObjectReferenceId()
3853  )) {
3854  $cmds["mail"] = $this->lng->txt("send_mail");
3855  }
3856 
3857  $cmds['addToClipboard'] = $this->lng->txt('clipboard_add_btn');
3858 
3859  return $cmds;
3860  }
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUserOwnerId()

ilObjUserFolderGUI::getUserOwnerId ( )

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

References USER_FOLDER_ID.

Referenced by importUsersObject().

122  : int
123  {
124  return $this->user_owner_id ?: USER_FOLDER_ID;
125  }
const USER_FOLDER_ID
Definition: constants.php:33
+ Here is the caller graph for this function:

◆ handleUploadedFiles()

ilObjUserFolderGUI::handleUploadedFiles ( )
private

Handles uploaded zip/xmp files with Filesystem implementation.

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

References Vendor\Package\$a, $DIC, $ilUser, ILIAS\LTI\ToolProvider\$key, $parts, ilFileUtils\getDataDir(), getImportDir(), ILIAS\Repository\lng(), and ilFileUtils\unzip().

Referenced by importUserRoleAssignmentObject().

1563  : string
1564  {
1565  global $DIC;
1566 
1567  $ilUser = $DIC->user();
1568  $subdir = "";
1569  $xml_file = "";
1570 
1571  $upload = $DIC->upload();
1572 
1573  $filesystem = $DIC->filesystem()->storage();
1574  $import_dir = $this->getImportDir();
1575 
1576  if (!$upload->hasBeenProcessed()) {
1577  $upload->process();
1578  }
1579 
1580  // recreate user import directory
1581  if ($filesystem->hasDir($import_dir)) {
1582  $filesystem->deleteDir($import_dir);
1583  }
1584  $filesystem->createDir($import_dir);
1585 
1586  foreach ($upload->getResults() as $single_file_upload) {
1587  $file_name = $single_file_upload->getName();
1588  $parts = pathinfo($file_name);
1589 
1590  //check if upload status is ok
1591  if (!$single_file_upload->isOK()) {
1592  $filesystem->deleteDir($import_dir);
1593  $this->ilias->raiseError(
1594  $this->lng->txt("no_import_file_found"),
1595  $this->ilias->error_obj->MESSAGE
1596  );
1597  }
1598 
1599  // move uploaded file to user import directory
1600  $upload->moveFilesTo(
1601  $import_dir,
1602  \ILIAS\FileUpload\Location::STORAGE
1603  );
1604 
1605  // handle zip file
1606  if ($single_file_upload->getMimeType() == "application/zip") {
1607  // Workaround: unzip function needs full path to file. Should be replaced once Filesystem has own unzip implementation
1608  $full_path = ilFileUtils::getDataDir() . '/user_import/usr_' . $ilUser->getId() . '_' . session_id() . "/" . $file_name;
1609  ilFileUtils::unzip($full_path);
1610 
1611  $xml_file = null;
1612  $file_list = $filesystem->listContents($import_dir);
1613 
1614  foreach ($file_list as $key => $a_file) {
1615  if (substr(
1616  $a_file->getPath(),
1617  -4
1618  ) == '.xml') {
1619  unset($file_list[$key]);
1620  $xml_file = $a_file->getPath();
1621  break;
1622  }
1623  }
1624 
1625  //Removing all files except the one to be imported, to make sure to get the right one in import-function
1626  foreach ($file_list as $a_file) {
1627  $filesystem->delete($a_file->getPath());
1628  }
1629 
1630  if (is_null($xml_file)) {
1631  $subdir = basename(
1632  $parts["basename"],
1633  "." . $parts["extension"]
1634  );
1635  $xml_file = $import_dir . "/" . $subdir . "/" . $subdir . ".xml";
1636  }
1637  } // handle xml file
1638  else {
1639  $a = $filesystem->listContents($import_dir);
1640  $file = end($a);
1641  $xml_file = $file->getPath();
1642  }
1643 
1644  // check xml file
1645  if (!$filesystem->has($xml_file)) {
1646  $filesystem->deleteDir($import_dir);
1647  $this->ilias->raiseError(
1648  $this->lng->txt("no_xml_file_found_in_zip")
1649  . " " . $subdir . "/" . $subdir . ".xml",
1650  $this->ilias->error_obj->MESSAGE
1651  );
1652  }
1653  }
1654 
1655  return $xml_file;
1656  }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
Class ChatMainBarProvider .
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
global $DIC
Definition: feed.php:28
string $key
Consumer key/client ID value.
Definition: System.php:193
header include for all ilias files.
static getDataDir()
get data directory (outside webspace)
$ilUser
Definition: imgupload.php:34
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importCancelledObject()

ilObjUserFolderGUI::importCancelledObject ( )

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

References $DIC, ILIAS\Repository\ctrl(), getImportDir(), and inAdministration().

1113  : void
1114  {
1115  global $DIC;
1116  $filesystem = $DIC->filesystem()->storage();
1117 
1118  // purge user import directory
1119  $import_dir = $this->getImportDir();
1120  if ($filesystem->hasDir($import_dir)) {
1121  $filesystem->deleteDir($import_dir);
1122  }
1123 
1124  if ($this->inAdministration()) {
1125  $this->ctrl->redirect(
1126  $this,
1127  "view"
1128  );
1129  } else {
1130  $this->ctrl->redirectByClass(
1131  'ilobjcategorygui',
1132  'listUsers'
1133  );
1134  }
1135  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ importUserFormObject()

ilObjUserFolderGUI::importUserFormObject ( )

display form for user import

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

References ilObjectGUI\$access, $DIC, ilObjectGUI\$tpl, ilRBACAccessHandler\checkAccess(), ILIAS\Repository\form(), initUserImportForm(), ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setContent().

1046  : void
1047  {
1048  global $DIC;
1049 
1050  $tpl = $DIC['tpl'];
1051  $rbacsystem = $DIC['rbacsystem'];
1052  $ilCtrl = $DIC->ctrl();
1053  $access = $DIC->access();
1054 
1055  $this->tabs_gui->clearTargets();
1056  $this->tabs_gui->setBackTarget(
1057  $this->lng->txt('usrf'),
1058  $ilCtrl->getLinkTarget(
1059  $this,
1060  'view'
1061  )
1062  );
1063  if (
1064  !$rbacsystem->checkAccess('create_usr', $this->object->getRefId())
1065  && !$access->checkAccess('cat_administrate_users', '', $this->object->getRefId())
1066  ) {
1067  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"));
1068  return;
1069  }
1070  $this->initUserImportForm();
1071  $tpl->setContent($this->form->getHTML());
1072  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
form( $class_path, string $cmd)
ilAccessHandler $access
initUserImportForm()
Init user import form.
+ Here is the call graph for this function:

◆ importUserRoleAssignmentObject()

ilObjUserFolderGUI::importUserRoleAssignmentObject ( )

display form for user import with new FileSystem implementation

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

References $DIC, $message, ilObjectGUI\$tpl, ILIAS\Repository\form(), ilFileUtils\getDataDir(), handleUploadedFiles(), initUserImportForm(), initUserRoleAssignmentForm(), ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setContent().

1154  : void
1155  {
1156  global $DIC;
1157 
1158  $tpl = $DIC->ui()->mainTemplate();
1159  $ilCtrl = $DIC->ctrl();
1160  $renderer = $DIC->ui()->renderer();
1161 
1162  $this->tabs_gui->clearTargets();
1163  $this->tabs_gui->setBackTarget(
1164  $this->lng->txt('usrf'),
1165  $ilCtrl->getLinkTarget(
1166  $this,
1167  'view'
1168  )
1169  );
1170 
1171  $this->initUserImportForm();
1172  if ($this->form->checkInput()) {
1173  $xml_file = $this->handleUploadedFiles();
1174  //importParser needs the full path to xml file
1175  $xml_file_full_path = ilFileUtils::getDataDir() . '/' . $xml_file;
1176 
1177  list($form, $message) = $this->initUserRoleAssignmentForm($xml_file_full_path);
1178 
1179  $tpl->setContent($message . $renderer->render($form));
1180  } else {
1181  $this->form->setValuesByPost();
1182  $tpl->setContent($this->form->getHTML());
1183  }
1184  }
handleUploadedFiles()
Handles uploaded zip/xmp files with Filesystem implementation.
global $DIC
Definition: feed.php:28
initUserRoleAssignmentForm(string $xml_file_full_path)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static getDataDir()
get data directory (outside webspace)
form( $class_path, string $cmd)
$message
Definition: xapiexit.php:32
initUserImportForm()
Init user import form.
+ Here is the call graph for this function:

◆ importUsersObject()

ilObjUserFolderGUI::importUsersObject ( )

Import Users with new form implementation.

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

References $DIC, $ilUser, $keys, ilObjectGUI\$request, ilObjRole\_getAssignUsersStatus(), ILIAS\Repository\ctrl(), ilFileUtils\getDataDir(), getImportDir(), getUserOwnerId(), IL_IMPORT_FAILURE, IL_IMPORT_SUCCESS, IL_IMPORT_WARNING, IL_USER_IMPORT, inAdministration(), initUserRoleAssignmentForm(), ILIAS\Repository\lng(), redirectAfterImport(), SYSTEM_ROLE_ID, and USER_FOLDER_ID.

1686  : void
1687  {
1688  global $DIC;
1689 
1690  $result = [];
1691  $xml_file = "";
1692  $ilUser = $DIC->user();
1693  $request = $DIC->http()->request();
1694  $ui_renderer = $DIC->ui()->renderer();
1695  $rbacreview = $DIC->rbac()->review();
1696  $rbacsystem = $DIC->rbac()->system();
1697  $filesystem = $DIC->filesystem()->storage();
1698  $import_dir = $this->getImportDir();
1699 
1700  $file_list = $filesystem->listContents($import_dir);
1701 
1702  //Make sure there's only one file in the import directory at this point
1703  if (count($file_list) > 1) {
1704  $filesystem->deleteDir($import_dir);
1705  $this->tpl->setOnScreenMessage($this->lng->txt('usrimport_wrong_file_count'), true);
1706  $this->redirectAfterImport();
1707  }
1708  $xml_file = $file_list[0]->getPath();
1709 
1710  //Need full path to xml file to initialise form
1711  $xml_path = ilFileUtils::getDataDir() . '/' . $xml_file;
1712 
1713  if ($request->getMethod() !== "POST") {
1714  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('usrimport_form_not_evaluabe'), true);
1715  $this->redirectAfterImport();
1716  }
1717 
1718  $form = $this->initUserRoleAssignmentForm($xml_path)[0]->withRequest($request);
1719  $result = $form->getData();
1720 
1721  if ($result === null) {
1722  $this->tpl->setContent($ui_renderer->render($form));
1723  return;
1724  }
1725 
1726  $rule = $result["conflict_action"][0] ?? 1;
1727 
1728  //If local roles exist, merge the roles that are to be assigned, otherwise just take the array that has global roles
1729  $local_role_selection = (array) ($result['local_role_selection'] ?? []);
1730  $global_role_selection = (array) ($result['global_role_selection'] ?? []);
1731  $roles = array_merge(
1732  $local_role_selection,
1733  $global_role_selection
1734  );
1735 
1736  $role_assignment = [];
1737  foreach ($roles as $value) {
1738  $keys = explode(
1739  "-",
1740  $value
1741  );
1742  if (count($keys) === 2) {
1743  $role_assignment[$keys[0]] = $keys[1];
1744  }
1745  }
1746 
1747  $import_parser = new ilUserImportParser(
1748  $xml_path,
1750  $rule
1751  );
1752  $import_parser->setFolderId($this->getUserOwnerId());
1753 
1754  // Catch hack attempts
1755  // We check here again, if the role folders are in the tree, and if the
1756  // user has permission on the roles.
1757  if (!empty($role_assignment)) {
1758  $global_roles = $rbacreview->getGlobalRoles();
1759  $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1760  foreach ($role_assignment as $role_id) {
1761  if ($role_id != "") {
1762  if (in_array(
1763  $role_id,
1764  $global_roles
1765  )) {
1766  if (!in_array(
1768  $roles_of_user
1769  )) {
1770  if (($role_id == SYSTEM_ROLE_ID && !in_array(
1772  $roles_of_user
1773  ))
1774  || ($this->object->getRefId() != USER_FOLDER_ID
1775  && !ilObjRole::_getAssignUsersStatus($role_id))
1776  ) {
1777  $filesystem->deleteDir($import_dir);
1778  $this->tpl->setOnScreenMessage(
1779  'failure',
1780  $this->lng->txt('usrimport_with_specified_role_not_permitted'),
1781  true
1782  );
1783  $this->redirectAfterImport();
1784  }
1785  }
1786  } else {
1787  $rolf = $rbacreview->getFoldersAssignedToRole(
1788  $role_id,
1789  true
1790  );
1791  if ($rbacreview->isDeleted($rolf[0])
1792  || !$rbacsystem->checkAccess(
1793  'write',
1794  $rolf[0]
1795  )) {
1796  $filesystem->deleteDir($import_dir);
1797  $this->tpl->setOnScreenMessage(
1798  'failure',
1799  $this->lng->txt('usrimport_with_specified_role_not_permitted'),
1800  true
1801  );
1802  $this->redirectAfterImport();
1803  }
1804  }
1805  }
1806  }
1807  }
1808 
1809  if (isset($result['send_mail'])) {
1810  $import_parser->setSendMail($result['send_mail'][0]);
1811  }
1812 
1813  $import_parser->setRoleAssignment($role_assignment);
1814  $import_parser->startParsing();
1815 
1816  // purge user import directory
1817  $filesystem->deleteDir($import_dir);
1818 
1819  switch ($import_parser->getErrorLevel()) {
1820  case IL_IMPORT_SUCCESS:
1821  $this->tpl->setOnScreenMessage('success', $this->lng->txt("user_imported"), true);
1822  break;
1823  case IL_IMPORT_WARNING:
1824  $this->tpl->setOnScreenMessage('success', $this->lng->txt("user_imported_with_warnings") . $import_parser->getProtocolAsHTML(
1825  $this->lng->txt("import_warning_log")
1826  ), true);
1827  break;
1828  case IL_IMPORT_FAILURE:
1829  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('user_import_failed'), true);
1830  $this->redirectAfterImport();
1831  break;
1832  }
1833 
1834  if ($this->inAdministration()) {
1835  $this->ctrl->redirect(
1836  $this,
1837  "view"
1838  );
1839  } else {
1840  $this->ctrl->redirectByClass(
1841  'ilobjcategorygui',
1842  'listUsers'
1843  );
1844  }
1845  }
const USER_FOLDER_ID
Definition: constants.php:33
const IL_USER_IMPORT
const SYSTEM_ROLE_ID
Definition: constants.php:29
const IL_IMPORT_FAILURE
const IL_IMPORT_WARNING
global $DIC
Definition: feed.php:28
const IL_IMPORT_SUCCESS
initUserRoleAssignmentForm(string $xml_file_full_path)
$keys
Definition: metadata.php:204
ServerRequestInterface $request
static getDataDir()
get data directory (outside webspace)
$ilUser
Definition: imgupload.php:34
static _getAssignUsersStatus(int $a_role_id)
+ Here is the call graph for this function:

◆ inAdministration()

ilObjUserFolderGUI::inAdministration ( )
protected

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

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

1108  : bool
1109  {
1110  return (strtolower($this->user_request->getBaseClass()) === 'iladministrationgui');
1111  }
+ Here is the caller graph for this function:

◆ initAccessRestrictionForm()

ilObjUserFolderGUI::initAccessRestrictionForm ( bool  $a_from_search = false)
protected

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

References $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), getActionUserIds(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ilFormPropertyGUI\setRequired(), ilDateTimeInputGUI\setShowTime(), ilPropertyFormGUI\setTitle(), and ilObjectGUI\viewObject().

Referenced by confirmaccessRestrictObject(), and setAccessRestrictionObject().

647  : ?ilPropertyFormGUI {
648  $user_ids = $this->getActionUserIds();
649  if (!$user_ids) {
650  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
651  $this->viewObject();
652  return null;
653  }
654 
655  $form = new ilPropertyFormGUI();
656  $form->setTitle($this->lng->txt("time_limit_add_time_limit_for_selected"));
658  $this->ctrl->getFormAction(
659  $this,
660  "confirmaccessRestrict"
661  )
662  );
663 
664  $from = new ilDateTimeInputGUI(
665  $this->lng->txt("access_from"),
666  "from"
667  );
668  $from->setShowTime(true);
669  $from->setRequired(true);
670  $form->addItem($from);
671 
672  $to = new ilDateTimeInputGUI(
673  $this->lng->txt("access_until"),
674  "to"
675  );
676  $to->setRequired(true);
677  $to->setShowTime(true);
678  $form->addItem($to);
679 
681  "confirmaccessRestrict",
682  $this->lng->txt("confirm")
683  );
685  "view",
686  $this->lng->txt("cancel")
687  );
688 
689  foreach ($user_ids as $user_id) {
690  $ufield = new ilHiddenInputGUI("id[]");
691  $ufield->setValue($user_id);
692  $form->addItem($ufield);
693  }
694 
695  // return to search?
696  if ($a_from_search || $this->user_request->getFrSearch()) {
697  $field = new ilHiddenInputGUI("frsrch");
698  $field->setValue(1);
699  $form->addItem($field);
700  }
701 
702  return $form;
703  }
setShowTime(bool $a_showtime)
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getActionUserIds()
Get selected items for table action.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_formaction)
setRequired(bool $a_required)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormGeneralSettings()

ilObjUserFolderGUI::initFormGeneralSettings ( )
protected

init general settings form

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

References $check, $DIC, $ilSetting, ilSubEnabledFormPropertyGUI\addSubItem(), ilNumberInputGUI\allowDecimals(), ILIAS\Repository\ctrl(), ilSessionControl\DEFAULT_ALLOW_CLIENT_MAINTENANCE, ILIAS\Repository\form(), ilSession\getSessionExpireValue(), ILIAS\Repository\lng(), ilDatePresentation\secondsToString(), ilSession\SESSION_HANDLING_FIXED, ilSession\SESSION_HANDLING_LOAD_DEPENDENT, ilRadioOption\setDisabled(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), setSubTabs(), ilCheckboxInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by generalSettingsObject(), and saveGeneralSettingsObject().

2170  : void
2171  {
2172  global $DIC;
2173 
2174  $ilSetting = $DIC['ilSetting'];
2175 
2176  $this->setSubTabs('settings');
2177  $this->tabs_gui->setTabActive('settings');
2178  $this->tabs_gui->setSubTabActive('general_settings');
2179 
2180  $this->form = new ilPropertyFormGUI();
2181  $this->form->setFormAction(
2182  $this->ctrl->getFormAction(
2183  $this,
2184  'saveGeneralSettings'
2185  )
2186  );
2187 
2188  $this->form->setTitle($this->lng->txt('general_settings'));
2189 
2190  $lua = new ilCheckboxInputGUI(
2191  $this->lng->txt('enable_local_user_administration'),
2192  'lua'
2193  );
2194  $lua->setInfo($this->lng->txt('enable_local_user_administration_info'));
2195  $lua->setValue(1);
2196  $this->form->addItem($lua);
2197 
2198  $lrua = new ilCheckboxInputGUI(
2199  $this->lng->txt('restrict_user_access'),
2200  'lrua'
2201  );
2202  $lrua->setInfo($this->lng->txt('restrict_user_access_info'));
2203  $lrua->setValue(1);
2204  $this->form->addItem($lrua);
2205 
2206  // enable alphabetical navigation in user administration
2207  $alph = new ilCheckboxInputGUI(
2208  $this->lng->txt('user_adm_enable_alpha_nav'),
2209  'user_adm_alpha_nav'
2210  );
2211  //$alph->setInfo($this->lng->txt('restrict_user_access_info'));
2212  $alph->setValue(1);
2213  $this->form->addItem($alph);
2214 
2215  // account codes
2216  $code = new ilCheckboxInputGUI(
2217  $this->lng->txt("user_account_code_setting"),
2218  "user_reactivate_code"
2219  );
2220  $code->setInfo($this->lng->txt('user_account_code_setting_info'));
2221  $this->form->addItem($code);
2222 
2223  // delete own account
2224  $own = new ilCheckboxInputGUI(
2225  $this->lng->txt("user_allow_delete_own_account"),
2226  "user_own_account"
2227  );
2228  $this->form->addItem($own);
2229  $own_email = new ilEMailInputGUI(
2230  $this->lng->txt("user_delete_own_account_notification_email"),
2231  "user_own_account_email"
2232  );
2233  $own->addSubItem($own_email);
2234 
2235  $withdrawalProvokesDeletion = new ilCheckboxInputGUI(
2236  $this->lng->txt('tos_withdrawal_usr_deletion'),
2237  'tos_withdrawal_usr_deletion'
2238  );
2239  $withdrawalProvokesDeletion->setInfo($this->lng->txt('tos_withdrawal_usr_deletion_info'));
2240  $withdrawalProvokesDeletion->setValue('1');
2241  $this->form->addItem($withdrawalProvokesDeletion);
2242 
2243  // BEGIN SESSION SETTINGS
2244 
2245  // create session handling radio group
2246  $ssettings = new ilRadioGroupInputGUI(
2247  $this->lng->txt('sess_mode'),
2248  'session_handling_type'
2249  );
2250 
2251  // first option, fixed session duration
2252  $fixed = new ilRadioOption(
2253  $this->lng->txt('sess_fixed_duration'),
2255  );
2256 
2257  // create session reminder subform
2258  $cb = new ilCheckboxInputGUI(
2259  $this->lng->txt("session_reminder"),
2260  "session_reminder_enabled"
2261  );
2262  $expires = ilSession::getSessionExpireValue();
2264  $expires,
2265  true
2266  );
2267  $cb->setInfo(
2268  $this->lng->txt("session_reminder_info") . "<br />" .
2269  sprintf(
2270  $this->lng->txt('session_reminder_session_duration'),
2271  $time
2272  )
2273  );
2274  $fixed->addSubItem($cb);
2275 
2276  // add session handling to radio group
2277  $ssettings->addOption($fixed);
2278 
2279  // second option, session control
2280  $ldsh = new ilRadioOption(
2281  $this->lng->txt('sess_load_dependent_session_handling'),
2283  );
2284 
2285  // add session control subform
2286 
2287  // this is the max count of active sessions
2288  // that are getting started simlutanously
2289  $sub_ti = new ilTextInputGUI(
2290  $this->lng->txt('session_max_count'),
2291  'session_max_count'
2292  );
2293  $sub_ti->setMaxLength(5);
2294  $sub_ti->setSize(5);
2295  $sub_ti->setInfo($this->lng->txt('session_max_count_info'));
2296  if (!$ilSetting->get(
2297  'session_allow_client_maintenance',
2299  )) {
2300  $sub_ti->setDisabled(true);
2301  }
2302  $ldsh->addSubItem($sub_ti);
2303 
2304  // after this (min) idle time the session can be deleted,
2305  // if there are further requests for new sessions,
2306  // but max session count is reached yet
2307  $sub_ti = new ilTextInputGUI(
2308  $this->lng->txt('session_min_idle'),
2309  'session_min_idle'
2310  );
2311  $sub_ti->setMaxLength(5);
2312  $sub_ti->setSize(5);
2313  $sub_ti->setInfo($this->lng->txt('session_min_idle_info'));
2314  if (!$ilSetting->get(
2315  'session_allow_client_maintenance',
2317  )) {
2318  $sub_ti->setDisabled(true);
2319  }
2320  $ldsh->addSubItem($sub_ti);
2321 
2322  // after this (max) idle timeout the session expires
2323  // and become invalid, so it is not considered anymore
2324  // when calculating current count of active sessions
2325  $sub_ti = new ilTextInputGUI(
2326  $this->lng->txt('session_max_idle'),
2327  'session_max_idle'
2328  );
2329  $sub_ti->setMaxLength(5);
2330  $sub_ti->setSize(5);
2331  $sub_ti->setInfo($this->lng->txt('session_max_idle_info'));
2332  if (!$ilSetting->get(
2333  'session_allow_client_maintenance',
2335  )) {
2336  $sub_ti->setDisabled(true);
2337  }
2338  $ldsh->addSubItem($sub_ti);
2339 
2340  // this is the max duration that can elapse between the first and the secnd
2341  // request to the system before the session is immidietly deleted
2342  $sub_ti = new ilTextInputGUI(
2343  $this->lng->txt('session_max_idle_after_first_request'),
2344  'session_max_idle_after_first_request'
2345  );
2346  $sub_ti->setMaxLength(5);
2347  $sub_ti->setSize(5);
2348  $sub_ti->setInfo($this->lng->txt('session_max_idle_after_first_request_info'));
2349  if (!$ilSetting->get(
2350  'session_allow_client_maintenance',
2352  )) {
2353  $sub_ti->setDisabled(true);
2354  }
2355  $ldsh->addSubItem($sub_ti);
2356 
2357  // add session control to radio group
2358  $ssettings->addOption($ldsh);
2359 
2360  // add radio group to form
2361  if ($ilSetting->get(
2362  'session_allow_client_maintenance',
2364  )) {
2365  // just shows the status wether the session
2366  //setting maintenance is allowed by setup
2367  $this->form->addItem($ssettings);
2368  } else {
2369  // just shows the status wether the session
2370  //setting maintenance is allowed by setup
2371  $ti = new ilNonEditableValueGUI(
2372  $this->lng->txt('session_config'),
2373  "session_config"
2374  );
2375  $ti->setValue($this->lng->txt('session_config_maintenance_disabled'));
2376  $ssettings->setDisabled(true);
2377  $ti->addSubItem($ssettings);
2378  $this->form->addItem($ti);
2379  }
2380 
2381  // END SESSION SETTINGS
2382 
2383  $this->lng->loadLanguageModule('ps');
2384 
2385  $pass = new ilFormSectionHeaderGUI();
2386  $pass->setTitle($this->lng->txt('ps_password_settings'));
2387  $this->form->addItem($pass);
2388 
2389  $check = new ilCheckboxInputGUI(
2390  $this->lng->txt('ps_password_change_on_first_login_enabled'),
2391  'password_change_on_first_login_enabled'
2392  );
2393  $check->setInfo($this->lng->txt('ps_password_change_on_first_login_enabled_info'));
2394  $this->form->addItem($check);
2395 
2396  $check = new ilCheckboxInputGUI(
2397  $this->lng->txt('ps_password_must_not_contain_loginame'),
2398  'password_must_not_contain_loginame'
2399  );
2400  $check->setInfo($this->lng->txt('ps_password_must_not_contain_loginame_info'));
2401  $this->form->addItem($check);
2402 
2403  $check = new ilCheckboxInputGUI(
2404  $this->lng->txt('ps_password_chars_and_numbers_enabled'),
2405  'password_chars_and_numbers_enabled'
2406  );
2407  //$check->setOptionTitle($this->lng->txt('ps_password_chars_and_numbers_enabled'));
2408  $check->setInfo($this->lng->txt('ps_password_chars_and_numbers_enabled_info'));
2409  $this->form->addItem($check);
2410 
2411  $check = new ilCheckboxInputGUI(
2412  $this->lng->txt('ps_password_special_chars_enabled'),
2413  'password_special_chars_enabled'
2414  );
2415  //$check->setOptionTitle($this->lng->txt('ps_password_special_chars_enabled'));
2416  $check->setInfo($this->lng->txt('ps_password_special_chars_enabled_info'));
2417  $this->form->addItem($check);
2418 
2419  $text = new ilNumberInputGUI(
2420  $this->lng->txt('ps_password_min_length'),
2421  'password_min_length'
2422  );
2423  $text->setInfo($this->lng->txt('ps_password_min_length_info'));
2424  $text->setSize(1);
2425  $text->setMaxLength(2);
2426  $this->form->addItem($text);
2427 
2428  $text = new ilNumberInputGUI(
2429  $this->lng->txt('ps_password_max_length'),
2430  'password_max_length'
2431  );
2432  $text->setInfo($this->lng->txt('ps_password_max_length_info'));
2433  $text->setSize(2);
2434  $text->setMaxLength(3);
2435  $this->form->addItem($text);
2436 
2437  $text = new ilNumberInputGUI(
2438  $this->lng->txt('ps_password_uppercase_chars_num'),
2439  'password_ucase_chars_num'
2440  );
2441  $text->setInfo($this->lng->txt('ps_password_uppercase_chars_num_info'));
2442  $text->setMinValue(0);
2443  $text->setSize(2);
2444  $text->setMaxLength(3);
2445  $this->form->addItem($text);
2446 
2447  $text = new ilNumberInputGUI(
2448  $this->lng->txt('ps_password_lowercase_chars_num'),
2449  'password_lowercase_chars_num'
2450  );
2451  $text->setInfo($this->lng->txt('ps_password_lowercase_chars_num_info'));
2452  $text->setMinValue(0);
2453  $text->setSize(2);
2454  $text->setMaxLength(3);
2455  $this->form->addItem($text);
2456 
2457  $text = new ilNumberInputGUI(
2458  $this->lng->txt('ps_password_max_age'),
2459  'password_max_age'
2460  );
2461  $text->setInfo($this->lng->txt('ps_password_max_age_info'));
2462  $text->setSize(2);
2463  $text->setMaxLength(3);
2464  $this->form->addItem($text);
2465 
2466  // password assistance
2467  $cb = new ilCheckboxInputGUI(
2468  $this->lng->txt("enable_password_assistance"),
2469  "password_assistance"
2470  );
2471  $cb->setInfo($this->lng->txt("password_assistance_info"));
2472  $this->form->addItem($cb);
2473 
2474  $pass = new ilFormSectionHeaderGUI();
2475  $pass->setTitle($this->lng->txt('ps_security_protection'));
2476  $this->form->addItem($pass);
2477 
2478  $text = new ilNumberInputGUI(
2479  $this->lng->txt('ps_login_max_attempts'),
2480  'login_max_attempts'
2481  );
2482  $text->setInfo($this->lng->txt('ps_login_max_attempts_info'));
2483  $text->setSize(1);
2484  $text->setMaxLength(2);
2485  $this->form->addItem($text);
2486 
2487  // prevent login from multiple pcs at the same time
2488  $objCb = new ilCheckboxInputGUI(
2489  $this->lng->txt('ps_prevent_simultaneous_logins'),
2490  'ps_prevent_simultaneous_logins'
2491  );
2492  $objCb->setValue(1);
2493  $objCb->setInfo($this->lng->txt('ps_prevent_simultaneous_logins_info'));
2494  $this->form->addItem($objCb);
2495 
2496  $log = new ilFormSectionHeaderGUI();
2497  $log->setTitle($this->lng->txt('loginname_settings'));
2498  $this->form->addItem($log);
2499 
2500  $chbChangeLogin = new ilCheckboxInputGUI(
2501  $this->lng->txt('allow_change_loginname'),
2502  'allow_change_loginname'
2503  );
2504  $chbChangeLogin->setValue(1);
2505  $this->form->addItem($chbChangeLogin);
2506  $chbCreateHistory = new ilCheckboxInputGUI(
2507  $this->lng->txt('history_loginname'),
2508  'create_history_loginname'
2509  );
2510  $chbCreateHistory->setInfo($this->lng->txt('loginname_history_info'));
2511  $chbCreateHistory->setValue(1);
2512 
2513  $chbChangeLogin->addSubItem($chbCreateHistory);
2514  $chbReuseLoginnames = new ilCheckboxInputGUI(
2515  $this->lng->txt('reuse_of_loginnames_contained_in_history'),
2516  'reuse_of_loginnames'
2517  );
2518  $chbReuseLoginnames->setValue(1);
2519  $chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
2520 
2521  $chbChangeLogin->addSubItem($chbReuseLoginnames);
2522  $chbChangeBlockingTime = new ilNumberInputGUI(
2523  $this->lng->txt('loginname_change_blocking_time'),
2524  'loginname_change_blocking_time'
2525  );
2526  $chbChangeBlockingTime->allowDecimals(true);
2527  $chbChangeBlockingTime->setSuffix($this->lng->txt('days'));
2528  $chbChangeBlockingTime->setInfo($this->lng->txt('loginname_change_blocking_time_info'));
2529  $chbChangeBlockingTime->setSize(10);
2530  $chbChangeBlockingTime->setMaxLength(10);
2531  $chbChangeLogin->addSubItem($chbChangeBlockingTime);
2532 
2533  $la = new ilCheckboxInputGUI(
2534  $this->lng->txt('usr_letter_avatars'),
2535  'letter_avatars'
2536  );
2537  $la->setValue(1);
2538  $la->setInfo($this->lng->txt('usr_letter_avatars_info'));
2539  $this->form->addItem($la);
2540 
2541  $passwordPolicySettingsHash = new \ilHiddenInputGUI('pw_policy_hash');
2542  $this->form->addItem($passwordPolicySettingsHash);
2543 
2544  $this->form->addCommandButton(
2545  'saveGeneralSettings',
2546  $this->lng->txt('save')
2547  );
2548  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDisabled(bool $a_disabled)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const SESSION_HANDLING_FIXED
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
global $DIC
Definition: feed.php:28
allowDecimals(bool $a_value)
This class represents a property in a property form.
This class represents a number property in a property form.
form( $class_path, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:17
$check
Definition: buildRTE.php:81
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 3589 of file class.ilObjUserFolderGUI.php.

References ilNumberInputGUI\allowDecimals(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormPropertyGUI\setInfo(), setSubTabs(), and ilCheckboxInputGUI\setValue().

Referenced by saveLoginnameSettingsObject(), and showLoginnameSettingsObject().

3589  : void
3590  {
3591  $this->setSubTabs('settings');
3592  $this->tabs_gui->setTabActive('settings');
3593  $this->tabs_gui->setSubTabActive('loginname_settings');
3594 
3595  $this->loginSettingsForm = new ilPropertyFormGUI();
3596  $this->loginSettingsForm->setFormAction(
3597  $this->ctrl->getFormAction(
3598  $this,
3599  'saveLoginnameSettings'
3600  )
3601  );
3602  $this->loginSettingsForm->setTitle($this->lng->txt('loginname_settings'));
3603 
3604  $chbChangeLogin = new ilCheckboxInputGUI(
3605  $this->lng->txt('allow_change_loginname'),
3606  'allow_change_loginname'
3607  );
3608  $chbChangeLogin->setValue(1);
3609  $this->loginSettingsForm->addItem($chbChangeLogin);
3610  $chbCreateHistory = new ilCheckboxInputGUI(
3611  $this->lng->txt('history_loginname'),
3612  'create_history_loginname'
3613  );
3614  $chbCreateHistory->setInfo($this->lng->txt('loginname_history_info'));
3615  $chbCreateHistory->setValue(1);
3616  $chbChangeLogin->addSubItem($chbCreateHistory);
3617  $chbReuseLoginnames = new ilCheckboxInputGUI(
3618  $this->lng->txt('reuse_of_loginnames_contained_in_history'),
3619  'reuse_of_loginnames'
3620  );
3621  $chbReuseLoginnames->setValue(1);
3622  $chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
3623  $chbChangeLogin->addSubItem($chbReuseLoginnames);
3624  $chbChangeBlockingTime = new ilNumberInputGUI(
3625  $this->lng->txt('loginname_change_blocking_time'),
3626  'loginname_change_blocking_time'
3627  );
3628  $chbChangeBlockingTime->allowDecimals(true);
3629  $chbChangeBlockingTime->setSuffix($this->lng->txt('days'));
3630  $chbChangeBlockingTime->setInfo($this->lng->txt('loginname_change_blocking_time_info'));
3631  $chbChangeBlockingTime->setSize(10);
3632  $chbChangeBlockingTime->setMaxLength(10);
3633  $chbChangeLogin->addSubItem($chbChangeBlockingTime);
3634 
3635  $this->loginSettingsForm->addCommandButton(
3636  'saveLoginnameSettings',
3637  $this->lng->txt('save')
3638  );
3639  }
This class represents a checkbox property in a property form.
allowDecimals(bool $a_value)
This class represents a number property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initNewAccountMailForm()

ilObjUserFolderGUI::initNewAccountMailForm ( )
protected

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

References $DIC, $form, ilObjectGUI\$lng, ilObjUserFolder\_lookupNewAccountMail(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilLanguage\getDefaultLanguage(), ilUtil\getImagePath(), ilLanguage\getInstalledLanguages(), ilLanguage\loadLanguageModule(), ilFileInputGUI\setAllowDeletion(), ilPropertyFormGUI\setDescription(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), ilPropertyFormGUI\setTitleIcon(), ilTextAreaInputGUI\setValue(), and ilLanguage\txt().

Referenced by newAccountMailObject().

3158  {
3159  global $DIC;
3160 
3161  $lng = $DIC['lng'];
3162  $ilCtrl = $DIC['ilCtrl'];
3163 
3164  $lng->loadLanguageModule("meta");
3165  $lng->loadLanguageModule("mail");
3166 
3167  $form = new ilPropertyFormGUI();
3168  $form->setFormAction($ilCtrl->getFormAction($this));
3169 
3170  $form->setTitleIcon(ilUtil::getImagePath("icon_mail.svg"));
3171  $form->setTitle($lng->txt("user_new_account_mail"));
3172  $form->setDescription($lng->txt("user_new_account_mail_desc"));
3173 
3174  $langs = $lng->getInstalledLanguages();
3175  foreach ($langs as $lang_key) {
3176  $amail = ilObjUserFolder::_lookupNewAccountMail($lang_key);
3177 
3178  $title = $lng->txt("meta_l_" . $lang_key);
3179  if ($lang_key == $lng->getDefaultLanguage()) {
3180  $title .= " (" . $lng->txt("default") . ")";
3181  }
3182 
3183  $header = new ilFormSectionHeaderGUI();
3184  $header->setTitle($title);
3185  $form->addItem($header);
3186 
3187  $subj = new ilTextInputGUI(
3188  $lng->txt("subject"),
3189  "subject_" . $lang_key
3190  );
3191  // $subj->setRequired(true);
3192  $subj->setValue($amail["subject"] ?? "");
3193  $form->addItem($subj);
3194 
3195  $salg = new ilTextInputGUI(
3196  $lng->txt("mail_salutation_general"),
3197  "sal_g_" . $lang_key
3198  );
3199  // $salg->setRequired(true);
3200  $salg->setValue($amail["sal_g"] ?? "");
3201  $form->addItem($salg);
3202 
3203  $salf = new ilTextInputGUI(
3204  $lng->txt("mail_salutation_female"),
3205  "sal_f_" . $lang_key
3206  );
3207  // $salf->setRequired(true);
3208  $salf->setValue($amail["sal_f"] ?? "");
3209  $form->addItem($salf);
3210 
3211  $salm = new ilTextInputGUI(
3212  $lng->txt("mail_salutation_male"),
3213  "sal_m_" . $lang_key
3214  );
3215  // $salm->setRequired(true);
3216  $salm->setValue($amail["sal_m"] ?? "");
3217  $form->addItem($salm);
3218 
3219  $body = new ilTextAreaInputGUI(
3220  $lng->txt("message_content"),
3221  "body_" . $lang_key
3222  );
3223  // $body->setRequired(true);
3224  $body->setValue($amail["body"] ?? "");
3225  $body->setRows(10);
3226  $body->setCols(100);
3227  $form->addItem($body);
3228 
3229  $att = new ilFileInputGUI(
3230  $lng->txt("attachment"),
3231  "att_" . $lang_key
3232  );
3233  $att->setAllowDeletion(true);
3234  if ($amail["att_file"] ?? false) {
3235  $att->setValue($amail["att_file"]);
3236  }
3237  $form->addItem($att);
3238  }
3239 
3241  "saveNewAccountMail",
3242  $lng->txt("save")
3243  );
3245  "cancelNewAccountMail",
3246  $lng->txt("cancel")
3247  );
3248 
3249  return $form;
3250  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getDefaultLanguage()
Return default language.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a file property in a property form.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupNewAccountMail(string $a_lang)
setFormAction(string $a_formaction)
getInstalledLanguages()
Get installed languages.
setTitleIcon(string $a_titleicon)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
setAllowDeletion(bool $a_val)
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserImportForm()

ilObjUserFolderGUI::initUserImportForm ( )

Init user import form.

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

References $DIC, ilObjectGUI\$lng, ILIAS\Repository\form(), ilFileInputGUI\setSuffixes(), and ilLanguage\txt().

Referenced by importUserFormObject(), and importUserRoleAssignmentObject().

1077  : void
1078  {
1079  global $DIC;
1080 
1081  $lng = $DIC['lng'];
1082  $ilCtrl = $DIC['ilCtrl'];
1083 
1084  $this->form = new ilPropertyFormGUI();
1085 
1086  // Import File
1087  $fi = new ilFileInputGUI(
1088  $lng->txt('import_file'),
1089  'importFile'
1090  );
1091  $fi->setSuffixes(['xml']);
1092  $fi->setRequired(true);
1093  $this->form->addItem($fi);
1094 
1095  $this->form->addCommandButton(
1096  'importUserRoleAssignment',
1097  $lng->txt('import')
1098  );
1099  $this->form->addCommandButton(
1100  'importCancelled',
1101  $lng->txt('cancel')
1102  );
1103 
1104  $this->form->setTitle($lng->txt('import_users'));
1105  $this->form->setFormAction($ilCtrl->getFormAction($this));
1106  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
global $DIC
Definition: feed.php:28
ilLanguage $lng
form( $class_path, string $cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserRoleAssignmentForm()

ilObjUserFolderGUI::initUserRoleAssignmentForm ( string  $xml_file_full_path)
private
Exceptions
ilCtrlException
Returns
array<, string>

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

References $DIC, ilObjectGUI\$form_action, $i, ilObjectGUI\$id, $ilUser, ILIAS\LTI\ToolProvider\$key, $message, $path, ilObjRole\_getAssignUsersStatus(), ilObjUserFolder\_lookupNewAccountMail(), ANONYMOUS_ROLE_ID, ILIAS\Repository\ctrl(), IL_EXTRACT_ROLES, IL_IGNORE_ON_CONFLICT, IL_UPDATE_ON_CONFLICT, IL_VERIFY, ILIAS\Repository\lng(), ILIAS\Repository\object(), ROLE_FOLDER_ID, SYSTEM_ROLE_ID, USER_FOLDER_ID, verifyXmlData(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by importUserRoleAssignmentObject(), and importUsersObject().

1190  : array
1191  {
1192  global $DIC;
1193 
1194  $ilUser = $DIC->user();
1195  $rbacreview = $DIC->rbac()->review();
1196  $rbacsystem = $DIC->rbac()->system();
1197  $ui = $DIC->ui()->factory();
1198  $global_roles_assignment_info = null;
1199  $local_roles_assignment_info = null;
1200 
1201  $import_parser = new ilUserImportParser(
1202  $xml_file_full_path,
1203  IL_VERIFY
1204  );
1205  $import_parser->startParsing();
1206 
1207  $message = $this->verifyXmlData($import_parser);
1208 
1209  $xml_file_name = explode(
1210  "/",
1211  $xml_file_full_path
1212  );
1213  $roles_import_filename = $ui->input()->field()->text($this->lng->txt("import_file"))
1214  ->withDisabled(true)
1215  ->withValue(end($xml_file_name));
1216 
1217  $roles_import_count = $ui->input()->field()->numeric($this->lng->txt("num_users"))
1218  ->withDisabled(true)
1219  ->withValue($import_parser->getUserCount());
1220 
1221  $import_parser = new ilUserImportParser(
1222  $xml_file_full_path,
1224  );
1225  $import_parser->startParsing();
1226  // Extract the roles
1227  $roles = $import_parser->getCollectedRoles();
1228 
1229  // get global roles
1230  $all_gl_roles = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
1231  $gl_roles = [];
1232  $roles_of_user = $rbacreview->assignedRoles($ilUser->getId());
1233  foreach ($all_gl_roles as $obj_data) {
1234  // check assignment permission if called from local admin
1235  if ($this->object->getRefId() != USER_FOLDER_ID) {
1236  if (!in_array(
1238  $roles_of_user
1239  ) && !ilObjRole::_getAssignUsersStatus($obj_data['obj_id'])) {
1240  continue;
1241  }
1242  }
1243  // exclude anonymous role from list
1244  if ($obj_data["obj_id"] != ANONYMOUS_ROLE_ID) {
1245  // do not allow to assign users to administrator role if current user does not has SYSTEM_ROLE_ID
1246  if ($obj_data["obj_id"] != SYSTEM_ROLE_ID or in_array(
1248  $roles_of_user
1249  )) {
1250  $gl_roles[$obj_data["obj_id"]] = $obj_data["title"];
1251  }
1252  }
1253  }
1254 
1255  // global roles
1256  $got_globals = false;
1257  $global_selects = [];
1258  foreach ($roles as $role_id => $role) {
1259  if ($role["type"] == "Global") {
1260  if (!$got_globals) {
1261  $global_roles_assignment_info = $ui->input()->field()->text(
1262  $this->lng->txt("roles_of_import_global")
1263  )->withDisabled(true)
1264  ->withValue($this->lng->txt("assign_global_role"));
1265  } else {
1266  $select_options[] = $this->lng->txt('usrimport_ignore_role');
1267  }
1268 
1269  //select options for new form input to still have both ids
1270  $select_options = [];
1271  foreach ($gl_roles as $key => $value) {
1272  $select_options[$role_id . "-" . $key] = $value;
1273  }
1274 
1275  // pre selection for role
1276  $pre_select = array_search(
1277  $role["name"],
1278  $select_options
1279  );
1280  if (!$pre_select) {
1281  switch ($role["name"]) {
1282  case "Administrator": // ILIAS 2/3 Administrator
1283  $pre_select = array_search(
1284  "Administrator",
1285  $select_options
1286  );
1287  break;
1288 
1289  case "Autor": // ILIAS 2 Author
1290  $pre_select = array_search(
1291  "User",
1292  $select_options
1293  );
1294  break;
1295 
1296  case "Lerner": // ILIAS 2 Learner
1297  $pre_select = array_search(
1298  "User",
1299  $select_options
1300  );
1301  break;
1302 
1303  case "Gast": // ILIAS 2 Guest
1304  $pre_select = array_search(
1305  "Guest",
1306  $select_options
1307  );
1308  break;
1309 
1310  case 'User':
1311  $pre_select = array_search(
1312  "User",
1313  $select_options
1314  );
1315  break;
1316  }
1317  }
1318 
1319  $select = $ui->input()->field()->select(
1320  $role["name"],
1321  $select_options
1322  )->withValue($pre_select);
1323  if (!$got_globals) {
1324  $got_globals = true;
1325  $global_selects[] = $select->withRequired(true);
1326  } else {
1327  $global_selects[] = $select;
1328  }
1329  }
1330  }
1331 
1332  // Check if local roles need to be assigned
1333  $got_locals = false;
1334  foreach ($roles as $role_id => $role) {
1335  if ($role["type"] == "Local") {
1336  $got_locals = true;
1337  break;
1338  }
1339  }
1340 
1341  if ($got_locals) {
1342  $local_roles_assignment_info = $ui->input()->field()->text($this->lng->txt("roles_of_import_local"))
1343  ->withDisabled(true)
1344  ->withValue($this->lng->txt("assign_local_role"));
1345 
1346  // get local roles
1347  if ($this->object->getRefId() == USER_FOLDER_ID) {
1348  // The import function has been invoked from the user folder
1349  // object. In this case, we show only matching roles,
1350  // because the user folder object is considered the parent of all
1351  // local roles and may contains thousands of roles on large ILIAS
1352  // installations.
1353  $loc_roles = [];
1354 
1355  $roleMailboxSearch = new \ilRoleMailboxSearch(new \ilMailRfc822AddressParserFactory());
1356  foreach ($roles as $role_id => $role) {
1357  if ($role["type"] == "Local") {
1358  $searchName = (strpos($role['name'], '#') === 0) ? $role['name'] : '#' . $role['name'];
1359  $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1360  foreach ($matching_role_ids as $mid) {
1361  if (!in_array(
1362  $mid,
1363  $loc_roles
1364  )) {
1365  $loc_roles[] = $mid;
1366  }
1367  }
1368  }
1369  }
1370  } else {
1371  // The import function has been invoked from a locally
1372  // administrated category. In this case, we show all roles
1373  // contained in the subtree of the category.
1374  $loc_roles = $rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
1375  }
1376  $l_roles = [];
1377 
1378  // create a search array with .
1379  foreach ($loc_roles as $key => $loc_role) {
1380  // fetch context path of role
1381  $rolf = $rbacreview->getFoldersAssignedToRole(
1382  $loc_role,
1383  true
1384  );
1385 
1386  // only process role folders that are not set to status "deleted"
1387  // and for which the user has write permissions.
1388  // We also don't show the roles which are in the ROLE_FOLDER_ID folder.
1389  // (The ROLE_FOLDER_ID folder contains the global roles).
1390  if (
1391  !$rbacreview->isDeleted($rolf[0]) &&
1392  $rbacsystem->checkAccess(
1393  'write',
1394  $rolf[0]
1395  ) &&
1396  $rolf[0] != ROLE_FOLDER_ID
1397  ) {
1398  // A local role is only displayed, if it is contained in the subtree of
1399  // the localy administrated category. If the import function has been
1400  // invoked from the user folder object, we show all local roles, because
1401  // the user folder object is considered the parent of all local roles.
1402  // Thus, if we start from the user folder object, we initialize the
1403  // isInSubtree variable with true. In all other cases it is initialized
1404  // with false, and only set to true if we find the object id of the
1405  // locally administrated category in the tree path to the local role.
1406  $isInSubtree = $this->object->getRefId() == USER_FOLDER_ID;
1407 
1408  $path_array = [];
1409  if ($this->tree->isInTree($rolf[0])) {
1410  // Create path. Paths which have more than 4 segments
1411  // are truncated in the middle.
1412  $tmpPath = $this->tree->getPathFull($rolf[0]);
1413  $tmpPath[] = $rolf[0];//adds target item to list
1414 
1415  for ($i = 1, $n = count($tmpPath) - 1; $i < $n; $i++) {
1416  if ($i < 3 || $i > $n - 3) {
1417  $path_array[] = $tmpPath[$i]['title'];
1418  } elseif ($i == 3 || $i == $n - 3) {
1419  $path_array[] = '...';
1420  }
1421 
1422  $isInSubtree |= $tmpPath[$i]['obj_id'] == $this->object->getId();
1423  }
1424  //revert this path for a better readability in dropdowns #18306
1425  $path = implode(
1426  " < ",
1427  array_reverse($path_array)
1428  );
1429  } else {
1430  $path = "<b>Rolefolder " . $rolf[0] . " not found in tree! (Role " . $loc_role . ")</b>";
1431  }
1432  $roleMailboxAddress = (new \ilRoleMailboxAddress($loc_role))->value();
1433  $l_roles[$loc_role] = $roleMailboxAddress . ', ' . $path;
1434  }
1435  } //foreach role
1436 
1437  natcasesort($l_roles);
1438  $l_roles["ignore"] = $this->lng->txt("usrimport_ignore_role");
1439 
1440  $roleMailboxSearch = new \ilRoleMailboxSearch(new \ilMailRfc822AddressParserFactory());
1441  $local_selects = [];
1442  foreach ($roles as $role_id => $role) {
1443  if ($role["type"] == "Local") {
1444  /*$this->tpl->setCurrentBlock("local_role");
1445  $this->tpl->setVariable("TXT_IMPORT_LOCAL_ROLE", $role["name"]);*/
1446  $searchName = (strpos($role['name'], '#') === 0) ? $role['name'] : '#' . $role['name'];
1447  $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
1448  $pre_select = count($matching_role_ids) == 1 ? $role_id . "-" . $matching_role_ids[0] : "ignore";
1449 
1450  $selectable_roles = [];
1451  if ($this->object->getRefId() == USER_FOLDER_ID) {
1452  // There are too many roles in a large ILIAS installation
1453  // that's why whe show only a choice with the the option "ignore",
1454  // and the matching roles.
1455  $selectable_roles["ignore"] = $this->lng->txt("usrimport_ignore_role");
1456  foreach ($matching_role_ids as $id) {
1457  $selectable_roles[$role_id . "-" . $id] = $l_roles[$id];
1458  }
1459  } else {
1460  foreach ($l_roles as $local_role_id => $value) {
1461  if ($local_role_id !== "ignore") {
1462  $selectable_roles[$role_id . "-" . $local_role_id] = $value;
1463  }
1464  }
1465  }
1466 
1467  if (count($selectable_roles) > 0) {
1468  $select = $ui->input()->field()
1469  ->select($role["name"], $selectable_roles)
1470  ->withRequired(true);
1471  if (array_key_exists($pre_select, $selectable_roles)) {
1472  $select = $select->withValue($pre_select);
1473  }
1474  $local_selects[] = $select;
1475  }
1476  }
1477  }
1478  }
1479 
1480  $handlers = array(
1481  IL_IGNORE_ON_CONFLICT => $this->lng->txt("ignore_on_conflict"),
1482  IL_UPDATE_ON_CONFLICT => $this->lng->txt("update_on_conflict")
1483  );
1484 
1485  $conflict_action_select = $ui->input()->field()->select(
1486  $this->lng->txt("conflict_handling"),
1487  $handlers,
1488  str_replace(
1489  '\n',
1490  '<br>',
1491  $this->lng->txt("usrimport_conflict_handling_info")
1492  )
1493  )
1494  ->withValue(IL_IGNORE_ON_CONFLICT)
1495  ->withRequired(true);
1496 
1497  // new account mail
1498  $this->lng->loadLanguageModule("mail");
1499  $amail = ilObjUserFolder::_lookupNewAccountMail($this->lng->getDefaultLanguage());
1500  $mail_section = null;
1501  if (trim($amail["body"] ?? "") != "" && trim($amail["subject"] ?? "") != "") {
1502  $send_checkbox = $ui->input()->field()->checkbox($this->lng->txt("user_send_new_account_mail"))
1503  ->withValue(true);
1504 
1505  $mail_section = $ui->input()->field()->section(
1506  [$send_checkbox],
1507  $this->lng->txt("mail_account_mail")
1508  );
1509  }
1510 
1511  $file_info_section = $ui->input()->field()->section(
1512  [
1513  "filename" => $roles_import_filename,
1514  "import_count" => $roles_import_count,
1515  ],
1516  $this->lng->txt("file_info")
1517  );
1518 
1519  $form_action = $this->ctrl->getFormActionByClass(self::class, 'importUsers');
1520 
1521  $form_elements = [
1522  "file_info" => $file_info_section
1523  ];
1524 
1525  if (!empty($global_selects)) {
1526  $global_role_info_section = $ui->input()
1527  ->field()
1528  ->section([$global_roles_assignment_info], $this->lng->txt("global_role_assignment"));
1529  $global_role_selection_section = $ui->input()->field()->section($global_selects, "");
1530  $form_elements["global_role_info"] = $global_role_info_section;
1531  $form_elements["global_role_selection"] = $global_role_selection_section;
1532  }
1533 
1534  if (!empty($local_selects)) {
1535  $local_role_info_section = $ui->input()->field()->section(
1536  [$local_roles_assignment_info],
1537  $this->lng->txt("local_role_assignment")
1538  );
1539  $local_role_selection_section = $ui->input()->field()->section(
1540  $local_selects,
1541  ""
1542  );
1543 
1544  $form_elements["local_role_info"] = $local_role_info_section;
1545  $form_elements["local_role_selection"] = $local_role_selection_section;
1546  }
1547 
1548  $form_elements["conflict_action"] = $ui->input()->field()->section([$conflict_action_select], "");
1549 
1550  if ($mail_section !== null) {
1551  $form_elements["send_mail"] = $mail_section;
1552  }
1553 
1554  return [$ui->input()->container()->form()->standard(
1555  $form_action,
1556  $form_elements
1557  ), $message];
1558  }
const USER_FOLDER_ID
Definition: constants.php:33
const SYSTEM_ROLE_ID
Definition: constants.php:29
const IL_EXTRACT_ROLES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$path
Definition: ltiservices.php:32
global $DIC
Definition: feed.php:28
Class ilMailRfc822AddressParserFactory.
static _lookupNewAccountMail(string $a_lang)
string $key
Consumer key/client ID value.
Definition: System.php:193
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
const ROLE_FOLDER_ID
Definition: constants.php:34
const ANONYMOUS_ROLE_ID
Definition: constants.php:28
const IL_VERIFY
$ilUser
Definition: imgupload.php:34
verifyXmlData(ilUserImportParser $import_parser)
$message
Definition: xapiexit.php:32
static _getAssignUsersStatus(int $a_role_id)
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
$i
Definition: metadata.php:41
+ 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 3735 of file class.ilObjUserFolderGUI.php.

References $DIC, and ilObject\_lookupType().

3735  : void
3736  {
3737  global $DIC;
3738 
3739  $ilCtrl = $DIC['ilCtrl'];
3740 
3741  $jmpToUser = $this->user_request->getJumpToUser();
3742  if (ilObject::_lookupType($jmpToUser) == "usr") {
3743  $ilCtrl->setParameterByClass(
3744  "ilobjusergui",
3745  "obj_id",
3746  $jmpToUser
3747  );
3748  $ilCtrl->redirectByClass(
3749  "ilobjusergui",
3750  "view"
3751  );
3752  }
3753  }
global $DIC
Definition: feed.php:28
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ mailObject()

ilObjUserFolderGUI::mailObject ( )
protected

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

References $DIC, $ilUser, ILIAS\Repository\ctrl(), getActionUserIds(), ilMailFormCall\getRedirectTarget(), ILIAS\Repository\lng(), ilMailingList\MODE_TEMPORARY, ilUtil\redirect(), and ilMail\retrieveFromStage().

Referenced by showActionConfirmation().

3978  : void
3979  {
3980  global $DIC;
3981 
3982  $ilUser = $DIC['ilUser'];
3983 
3984  $user_ids = $this->getActionUserIds();
3985  if (!$user_ids) {
3986  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
3987  $this->ctrl->redirect(
3988  $this,
3989  'view'
3990  );
3991  return;
3992  }
3993 
3994  // remove existing (temporary) lists
3995  $list = new ilMailingLists($ilUser);
3996  $list->deleteTemporaryLists();
3997 
3998  // create (temporary) mailing list
3999  $list = new ilMailingList($ilUser);
4000  $list->setMode(ilMailingList::MODE_TEMPORARY);
4001  $list->setTitle("-TEMPORARY SYSTEM LIST-");
4002  $list->setDescription("-USER ACCOUNTS MAIL-");
4003  $list->setCreatedate(date("Y-m-d H:i:s"));
4004  $list->insert();
4005  $list_id = $list->getId();
4006 
4007  // after list has been saved...
4008  foreach ($user_ids as $user_id) {
4009  $list->assignUser($user_id);
4010  }
4011 
4012  $umail = new ilFormatMail($ilUser->getId());
4013  $mail_data = $umail->retrieveFromStage();
4014 
4015  $umail->persistToStage(
4016  $mail_data['user_id'],
4017  $mail_data['attachments'],
4018  '#il_ml_' . $list_id,
4019  $mail_data['rcp_cc'],
4020  $mail_data['rcp_bcc'],
4021  $mail_data['m_subject'],
4022  $mail_data['m_message'],
4023  $mail_data['use_placeholders'],
4024  $mail_data['tpl_ctx_id'],
4025  $mail_data['tpl_ctx_params']
4026  );
4027 
4030  $this,
4031  '',
4032  [],
4033  array(
4034  'type' => 'search_res'
4035  )
4036  )
4037  );
4038  }
retrieveFromStage()
getActionUserIds()
Get selected items for table action.
global $DIC
Definition: feed.php:28
static redirect(string $a_script)
$ilUser
Definition: imgupload.php:34
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])
+ 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 3255 of file class.ilObjUserFolderGUI.php.

References $DIC, ilObjectGUI\$lng, ilPropertyFormGUI\getHTML(), initNewAccountMailForm(), raiseErrorOnMissingWrite(), setSubTabs(), and ilLanguage\txt().

3255  : void
3256  {
3257  global $DIC;
3258 
3259  $lng = $DIC['lng'];
3260 
3261  $this->raiseErrorOnMissingWrite();
3262  $this->setSubTabs('settings');
3263  $this->tabs_gui->setTabActive('settings');
3264  $this->tabs_gui->setSubTabActive('user_new_account_mail');
3265 
3266  $form = $this->initNewAccountMailForm();
3267 
3268  $ftpl = new ilTemplate(
3269  'tpl.usrf_new_account_mail.html',
3270  true,
3271  true,
3272  'Services/User'
3273  );
3274  $ftpl->setVariable(
3275  "FORM",
3276  $form->getHTML()
3277  );
3278  unset($form);
3279 
3280  // placeholder help text
3281  $ftpl->setVariable(
3282  "TXT_USE_PLACEHOLDERS",
3283  $lng->txt("mail_nacc_use_placeholder")
3284  );
3285  $ftpl->setVariable(
3286  "TXT_MAIL_SALUTATION",
3287  $lng->txt("mail_nacc_salutation")
3288  );
3289  $ftpl->setVariable(
3290  "TXT_FIRST_NAME",
3291  $lng->txt("firstname")
3292  );
3293  $ftpl->setVariable(
3294  "TXT_LAST_NAME",
3295  $lng->txt("lastname")
3296  );
3297  $ftpl->setVariable(
3298  "TXT_EMAIL",
3299  $lng->txt("email")
3300  );
3301  $ftpl->setVariable(
3302  "TXT_LOGIN",
3303  $lng->txt("mail_nacc_login")
3304  );
3305  $ftpl->setVariable(
3306  "TXT_PASSWORD",
3307  $lng->txt("password")
3308  );
3309  $ftpl->setVariable(
3310  "TXT_PASSWORD_BLOCK",
3311  $lng->txt("mail_nacc_pw_block")
3312  );
3313  $ftpl->setVariable(
3314  "TXT_NOPASSWORD_BLOCK",
3315  $lng->txt("mail_nacc_no_pw_block")
3316  );
3317  $ftpl->setVariable(
3318  "TXT_ADMIN_MAIL",
3319  $lng->txt("mail_nacc_admin_mail")
3320  );
3321  $ftpl->setVariable(
3322  "TXT_ILIAS_URL",
3323  $lng->txt("mail_nacc_ilias_url")
3324  );
3325  $ftpl->setVariable(
3326  "TXT_INSTALLATION_NAME",
3327  $lng->txt("mail_nacc_installation_name")
3328  );
3329  $ftpl->setVariable(
3330  "TXT_TARGET",
3331  $lng->txt("mail_nacc_target")
3332  );
3333  $ftpl->setVariable(
3334  "TXT_TARGET_TITLE",
3335  $lng->txt("mail_nacc_target_title")
3336  );
3337  $ftpl->setVariable(
3338  "TXT_TARGET_TYPE",
3339  $lng->txt("mail_nacc_target_type")
3340  );
3341  $ftpl->setVariable(
3342  "TXT_TARGET_BLOCK",
3343  $lng->txt("mail_nacc_target_block")
3344  );
3345  $ftpl->setVariable(
3346  "TXT_IF_TIMELIMIT",
3347  $lng->txt("mail_nacc_if_timelimit")
3348  );
3349  $ftpl->setVariable(
3350  "TXT_TIMELIMIT",
3351  $lng->txt("mail_nacc_timelimit")
3352  );
3353 
3354  $this->tpl->setContent($ftpl->get());
3355  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
global $DIC
Definition: feed.php:28
ilLanguage $lng
+ Here is the call graph for this function:

◆ performExportObject()

ilObjUserFolderGUI::performExportObject ( )
protected
Exceptions
ilCtrlException
ilObjectException

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

References ilObjectGUI\checkPermission(), and ILIAS\Repository\ctrl().

3103  : void
3104  {
3105  $this->checkPermission("write,read_users");
3106 
3107  $this->object->buildExportFile($this->user_request->getExportType());
3108  $this->ctrl->redirect(
3109  $this,
3110  'export'
3111  );
3112  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ raiseErrorOnMissingWrite()

ilObjUserFolderGUI::raiseErrorOnMissingWrite ( )
private

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

References ILIAS\Repository\access(), ILIAS\Repository\lng(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

Referenced by activateUsersObject(), confirmSavedObject(), deactivateUsersObject(), deleteExportFileObject(), executeCommand(), freeAccessObject(), generalSettingsObject(), newAccountMailObject(), restrictAccessObject(), saveGeneralSettingsObject(), saveGlobalUserSettingsObject(), saveNewAccountMailObject(), settingsObject(), and userActionObject().

4137  : void
4138  {
4139  if (!$this->access->checkRbacOrPositionPermissionAccess(
4140  'write',
4143  )) {
4144  $this->ilias->raiseError(
4145  $this->lng->txt('permission_denied'),
4146  $this->ilias->error_obj->MESSAGE
4147  );
4148  }
4149  }
const USER_FOLDER_ID
Definition: constants.php:33
header include for all ilias files.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectAfterImport()

ilObjUserFolderGUI::redirectAfterImport ( )
private

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

References ILIAS\Repository\ctrl(), and inAdministration().

Referenced by importUsersObject().

4101  : void
4102  {
4103  if ($this->inAdministration()) {
4104  $this->ctrl->redirect(
4105  $this,
4106  'view'
4107  );
4108  }
4109 
4110  $this->ctrl->redirectByClass(
4111  'ilobjcategorygui',
4112  'listUsers'
4113  );
4114  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilterObject()

ilObjUserFolderGUI::resetFilterObject ( )

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

References ilObjectGUI\viewObject().

235  : void
236  {
237  $utab = new ilUserTableGUI(
238  $this,
239  "view"
240  );
241  $utab->resetOffset();
242  $utab->resetFilter();
243  $this->viewObject(true);
244  }
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ restrictAccessObject()

ilObjUserFolderGUI::restrictAccessObject ( )

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

References raiseErrorOnMissingWrite(), and showActionConfirmation().

1022  : void
1023  {
1024  $this->raiseErrorOnMissingWrite();
1025  $this->showActionConfirmation('accessRestrict');
1026  }
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ saveGeneralSettingsObject()

ilObjUserFolderGUI::saveGeneralSettingsObject ( )

Save user account settings.

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

References $DIC, $ilSetting, $valid, ilSecuritySettings\_getInstance(), ILIAS\Repository\ctrl(), ilSessionControl\DEFAULT_ALLOW_CLIENT_MAINTENANCE, ILIAS\Repository\form(), ilUserAccountSettings\getInstance(), getPasswordPolicySettingsMap(), initFormGeneralSettings(), ILIAS\Repository\int(), ILIAS\Repository\lng(), raiseErrorOnMissingWrite(), ilSession\SESSION_HANDLING_FIXED, ilSession\SESSION_HANDLING_LOAD_DEPENDENT, and ilSessionStatistics\updateLimitLog().

1944  : void
1945  {
1946  global $DIC;
1947 
1948  $ilSetting = $DIC['ilSetting'];
1949 
1950  $this->raiseErrorOnMissingWrite();
1951  $this->initFormGeneralSettings();
1952  if ($this->form->checkInput()) {
1953  $valid = true;
1954  if (!strlen($this->form->getInput('loginname_change_blocking_time'))) {
1955  $valid = false;
1956  $this->form->getItemByPostVar('loginname_change_blocking_time')
1957  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
1958  }
1959 
1960  $security = ilSecuritySettings::_getInstance();
1961 
1962  // account security settings
1963  $security->setPasswordCharsAndNumbersEnabled(
1964  (bool) $this->form->getInput("password_chars_and_numbers_enabled")
1965  );
1966  $security->setPasswordSpecialCharsEnabled(
1967  (bool) $this->form->getInput("password_special_chars_enabled")
1968  );
1969  $security->setPasswordMinLength(
1970  (int) $this->form->getInput("password_min_length")
1971  );
1972  $security->setPasswordMaxLength(
1973  (int) $this->form->getInput("password_max_length")
1974  );
1975  $security->setPasswordNumberOfUppercaseChars(
1976  (int) $this->form->getInput("password_ucase_chars_num")
1977  );
1978  $security->setPasswordNumberOfLowercaseChars(
1979  (int) $this->form->getInput("password_lowercase_chars_num")
1980  );
1981  $security->setPasswordMaxAge(
1982  (int) $this->form->getInput("password_max_age")
1983  );
1984  $security->setLoginMaxAttempts(
1985  (int) $this->form->getInput("login_max_attempts")
1986  );
1987  $security->setPreventionOfSimultaneousLogins(
1988  (bool) $this->form->getInput("ps_prevent_simultaneous_logins")
1989  );
1990  $security->setPasswordChangeOnFirstLoginEnabled(
1991  (bool) $this->form->getInput("password_change_on_first_login_enabled")
1992  );
1993  $security->setPasswordMustNotContainLoginnameStatus(
1994  (bool) $this->form->getInput("password_must_not_contain_loginame")
1995  );
1996 
1997  if (!is_null($security->validate($this->form))) {
1998  $valid = false;
1999  }
2000 
2001  if ($valid) {
2002  $security->save();
2003 
2004  ilUserAccountSettings::getInstance()->enableLocalUserAdministration($this->form->getInput('lua'));
2005  ilUserAccountSettings::getInstance()->restrictUserAccess($this->form->getInput('lrua'));
2007 
2008  $ilSetting->set(
2009  'allow_change_loginname',
2010  (int) $this->form->getInput('allow_change_loginname')
2011  );
2012  $ilSetting->set(
2013  'create_history_loginname',
2014  (int) $this->form->getInput('create_history_loginname')
2015  );
2016  $ilSetting->set(
2017  'reuse_of_loginnames',
2018  (int) $this->form->getInput('reuse_of_loginnames')
2019  );
2020  $save_blocking_time_in_seconds = (int) ($this->form->getInput(
2021  'loginname_change_blocking_time'
2022  ) * 86400);
2023  $ilSetting->set(
2024  'loginname_change_blocking_time',
2025  $save_blocking_time_in_seconds
2026  );
2027  $ilSetting->set(
2028  'user_adm_alpha_nav',
2029  (int) $this->form->getInput('user_adm_alpha_nav')
2030  );
2031  $ilSetting->set(
2032  'user_reactivate_code',
2033  (int) $this->form->getInput('user_reactivate_code')
2034  );
2035 
2036  $ilSetting->set(
2037  'user_delete_own_account',
2038  (int) $this->form->getInput('user_own_account')
2039  );
2040  $ilSetting->set(
2041  'user_delete_own_account_email',
2042  $this->form->getInput('user_own_account_email')
2043  );
2044  $ilSetting->set(
2045  'tos_withdrawal_usr_deletion',
2046  (string) ((int) $this->form->getInput('tos_withdrawal_usr_deletion'))
2047  );
2048 
2049  $ilSetting->set(
2050  "password_assistance",
2051  $this->form->getInput("password_assistance")
2052  );
2053 
2054  // BEGIN SESSION SETTINGS
2055  $ilSetting->set(
2056  'session_handling_type',
2057  (int) $this->form->getInput('session_handling_type')
2058  );
2059 
2060  if ($this->form->getInput('session_handling_type') == ilSession::SESSION_HANDLING_FIXED) {
2061  $ilSetting->set(
2062  'session_reminder_enabled',
2063  $this->form->getInput('session_reminder_enabled')
2064  );
2065  } elseif ($this->form->getInput(
2066  'session_handling_type'
2068  if (
2069  $ilSetting->get(
2070  'session_allow_client_maintenance',
2072  )
2073  ) {
2074  // has to be done BEFORE updating the setting!
2075  ilSessionStatistics::updateLimitLog((int) $this->form->getInput('session_max_count'));
2076 
2077  $ilSetting->set(
2078  'session_max_count',
2079  (int) $this->form->getInput('session_max_count')
2080  );
2081  $ilSetting->set(
2082  'session_min_idle',
2083  (int) $this->form->getInput('session_min_idle')
2084  );
2085  $ilSetting->set(
2086  'session_max_idle',
2087  (int) $this->form->getInput('session_max_idle')
2088  );
2089  $ilSetting->set(
2090  'session_max_idle_after_first_request',
2091  (int) $this->form->getInput('session_max_idle_after_first_request')
2092  );
2093  }
2094  }
2095  // END SESSION SETTINGS
2096  $ilSetting->set(
2097  'letter_avatars',
2098  (int) $this->form->getInput('letter_avatars')
2099  );
2100 
2101  $requestPasswordReset = false;
2102  if ($this->form->getInput('pw_policy_hash')) {
2103  $oldSettingsHash = $this->form->getInput('pw_policy_hash');
2104  $currentSettingsHash = md5(
2105  implode(
2106  '',
2107  $this->getPasswordPolicySettingsMap($security)
2108  )
2109  );
2110  $requestPasswordReset = ($oldSettingsHash !== $currentSettingsHash);
2111  }
2112 
2113  if ($requestPasswordReset) {
2114  $this->ctrl->redirect(
2115  $this,
2116  'askForUserPasswordReset'
2117  );
2118  } else {
2119  $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'));
2120  }
2121  } else {
2122  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
2123  }
2124  } else {
2125  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
2126  }
2127  $this->form->setValuesByPost();
2128  $this->tpl->setContent($this->form->getHTML());
2129  }
static updateLimitLog(int $a_new_value)
Log max session setting.
$valid
initFormGeneralSettings()
init general settings form
getPasswordPolicySettingsMap(\ilSecuritySettings $security)
const SESSION_HANDLING_FIXED
global $DIC
Definition: feed.php:28
form( $class_path, string $cmd)
global $ilSetting
Definition: privfeed.php:17
const SESSION_HANDLING_LOAD_DEPENDENT
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ saveGlobalUserSettingsObject()

ilObjUserFolderGUI::saveGlobalUserSettingsObject ( string  $action = "")

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

References $DIC, ilObjectGUI\$ilias, $ilSetting, ilObjectGUI\$lng, $user_settings_config, $valid, ilUserSearchOptions\_isSearchable(), ilMemberAgreement\_reset(), ilUserSearchOptions\_saveStatus(), collectChangedFields(), ILIAS\deleteSetting(), ILIAS\Repository\lng(), raiseErrorOnMissingWrite(), ilUserSettingsConfig\setChangeable(), ILIAS\setSetting(), settingsObject(), ilUserSettingsConfig\setVisible(), and ilLanguage\txt().

Referenced by confirmSavedObject().

2591  : void
2592  {
2593  global $DIC;
2594 
2595  $ilias = $DIC['ilias'];
2596  $ilSetting = $DIC['ilSetting'];
2597 
2598  $this->raiseErrorOnMissingWrite();
2599 
2600  $checked = $this->user_request->getChecked();
2601  $selected = $this->user_request->getSelect();
2602 
2604 
2605  // see ilUserFieldSettingsTableGUI
2606  $up = new ilUserProfile();
2607  $up->skipField("username");
2608  $field_properties = $up->getStandardFields();
2609  $profile_fields = array_keys($field_properties);
2610 
2611  $valid = true;
2612  foreach ($profile_fields as $field) {
2613  if (($checked["required_" . $field] ?? false) &&
2614  !(int) ($checked['visib_reg_' . $field] ?? null)
2615  ) {
2616  $valid = false;
2617  break;
2618  }
2619  }
2620 
2621  if (!$valid) {
2622  global $DIC;
2623 
2624  $lng = $DIC['lng'];
2625  $this->tpl->setOnScreenMessage('failure', $lng->txt('invalid_visible_required_options_selected'));
2626  $this->confirm_change = 1;
2627  $this->settingsObject();
2628  return;
2629  }
2630 
2631  // For the following fields, the required state can not be changed
2632  $fixed_required_fields = array(
2633  "firstname" => 1,
2634  "lastname" => 1,
2635  "upload" => 0,
2636  "password" => 0,
2637  "language" => 0,
2638  "skin_style" => 0,
2639  "hits_per_page" => 0,
2640  /*"show_users_online" => 0,*/
2641  "hide_own_online_status" => 0
2642  );
2643 
2644  // Reset user confirmation
2645  if ($action == 'save') {
2647  }
2648 
2649  $changedFields = $this->collectChangedFields();
2650  if ($this->handleChangeListeners($changedFields, $field_properties)) {
2651  return;
2652  }
2653 
2654  foreach ($profile_fields as $field) {
2655  // Enable disable searchable
2656  if (ilUserSearchOptions::_isSearchable($field)) {
2658  $field,
2659  (bool) ($checked['searchable_' . $field] ?? false)
2660  );
2661  }
2662 
2663  if (!($checked["visible_" . $field] ?? false) && !($field_properties[$field]["visible_hide"] ?? false)) {
2665  $field,
2666  false
2667  );
2668  } else {
2670  $field,
2671  true
2672  );
2673  }
2674 
2675  if (!($checked["changeable_" . $field] ?? false) &&
2676  !($field_properties[$field]["changeable_hide"] ?? false)) {
2678  $field,
2679  false
2680  );
2681  } else {
2683  $field,
2684  true
2685  );
2686  }
2687 
2688  // registration visible
2689  if (($checked['visib_reg_' . $field] ?? false) && !($field_properties[$field]["visib_reg_hide"] ?? false)) {
2690  $ilSetting->set(
2691  'usr_settings_visib_reg_' . $field,
2692  '1'
2693  );
2694  } else {
2695  $ilSetting->set(
2696  'usr_settings_visib_reg_' . $field,
2697  '0'
2698  );
2699  }
2700 
2701  if ($checked['visib_lua_' . $field] ?? false) {
2702  $ilSetting->set(
2703  'usr_settings_visib_lua_' . $field,
2704  '1'
2705  );
2706  } else {
2707  $ilSetting->set(
2708  'usr_settings_visib_lua_' . $field,
2709  '0'
2710  );
2711  }
2712 
2713  if ((int) ($checked['changeable_lua_' . $field] ?? false)) {
2714  $ilSetting->set(
2715  'usr_settings_changeable_lua_' . $field,
2716  '1'
2717  );
2718  } else {
2719  $ilSetting->set(
2720  'usr_settings_changeable_lua_' . $field,
2721  '0'
2722  );
2723  }
2724 
2725  if (($checked["export_" . $field] ?? false) && !($field_properties[$field]["export_hide"] ?? false)) {
2726  $ilias->setSetting(
2727  "usr_settings_export_" . $field,
2728  "1"
2729  );
2730  } else {
2731  $ilias->deleteSetting("usr_settings_export_" . $field);
2732  }
2733 
2734  // Course export/visibility
2735  if (($checked["course_export_" . $field] ?? false) && !($field_properties[$field]["course_export_hide"] ?? false)) {
2736  $ilias->setSetting(
2737  "usr_settings_course_export_" . $field,
2738  "1"
2739  );
2740  } else {
2741  $ilias->deleteSetting("usr_settings_course_export_" . $field);
2742  }
2743 
2744  // Group export/visibility
2745  if (($checked["group_export_" . $field] ?? false) && !($field_properties[$field]["group_export_hide"] ?? false)) {
2746  $ilias->setSetting(
2747  "usr_settings_group_export_" . $field,
2748  "1"
2749  );
2750  } else {
2751  $ilias->deleteSetting("usr_settings_group_export_" . $field);
2752  }
2753 
2754  $is_fixed = array_key_exists(
2755  $field,
2756  $fixed_required_fields
2757  );
2758  if (($is_fixed && $fixed_required_fields[$field]) || (!$is_fixed && ($checked["required_" . $field] ?? false))) {
2759  $ilias->setSetting(
2760  "require_" . $field,
2761  "1"
2762  );
2763  } else {
2764  $ilias->deleteSetting("require_" . $field);
2765  }
2766  }
2767 
2768  if (isset($selected['default_hits_per_page']) && $selected['default_hits_per_page']) {
2769  $ilias->setSetting(
2770  'hits_per_page',
2771  $selected['default_hits_per_page']
2772  );
2773  }
2774 
2775  if ($checked["export_preferences"] ?? false) {
2776  $ilias->setSetting(
2777  "usr_settings_export_preferences",
2778  $checked["export_preferences"]
2779  );
2780  } else {
2781  $ilias->deleteSetting("usr_settings_export_preferences");
2782  }
2783 
2784  $ilias->setSetting(
2785  'mail_incoming_mail',
2786  $selected['default_mail_incoming_mail'] ?? '0'
2787  );
2788  $ilias->setSetting(
2789  'chat_osc_accept_msg',
2790  $selected['default_chat_osc_accept_msg'] ?? 'n'
2791  );
2792  $ilias->setSetting(
2793  'chat_broadcast_typing',
2794  $selected['default_chat_broadcast_typing'] ?? 'n'
2795  );
2796  $ilias->setSetting(
2797  'bs_allow_to_contact_me',
2798  $selected['default_bs_allow_to_contact_me'] ?? 'n'
2799  );
2800  $ilias->setSetting(
2801  'hide_own_online_status',
2802  $selected['default_hide_own_online_status'] ?? 'n'
2803  );
2804 
2805  if ($this->usrFieldChangeListenersAccepted && count($changedFields) > 0) {
2806  $this->dic->event()->raise(
2807  "Services/User",
2808  "onUserFieldAttributesChanged",
2809  $changedFields
2810  );
2811  }
2812 
2813  $this->tpl->setOnScreenMessage('success', $this->lng->txt("usr_settings_saved"));
2814  $this->settingsObject();
2815  }
static _saveStatus(string $a_key, bool $a_enabled)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _isSearchable(string $a_key)
$valid
Class ilUserProfile.
settingsObject()
Global user settings Allows to define global settings for user accounts Note: The Global user setting...
static _reset()
Reset all.
global $DIC
Definition: feed.php:28
ilLanguage $lng
setSetting(string $a_key, string $a_val)
deleteSetting(string $a_keyword)
delete one value from settingstable
Definition: class.ilias.php:98
setVisible(string $field, bool $visible)
Set a profile field being visible.
setChangeable(string $field, bool $changeable)
Set a profile field being changeable.
global $ilSetting
Definition: privfeed.php:17
ilUserSettingsConfig $user_settings_config
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveLoginnameSettingsObject()

ilObjUserFolderGUI::saveLoginnameSettingsObject ( )

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

References $DIC, $ilSetting, $valid, initLoginSettingsForm(), ILIAS\Repository\int(), and ILIAS\Repository\lng().

3641  : void
3642  {
3643  global $DIC;
3644 
3645  $ilSetting = $DIC['ilSetting'];
3646 
3647  $this->initLoginSettingsForm();
3648  if ($this->loginSettingsForm->checkInput()) {
3649  $valid = true;
3650 
3651  if (!strlen($this->loginSettingsForm->getInput('loginname_change_blocking_time'))) {
3652  $valid = false;
3653  $this->loginSettingsForm->getItemByPostVar('loginname_change_blocking_time')
3654  ->setAlert($this->lng->txt('loginname_change_blocking_time_invalidity_info'));
3655  }
3656 
3657  if ($valid) {
3658  $save_blocking_time_in_seconds = (int) $this->loginSettingsForm->getInput(
3659  'loginname_change_blocking_time'
3660  ) * 86400;
3661 
3662  $ilSetting->set(
3663  'allow_change_loginname',
3664  (int) $this->loginSettingsForm->getInput('allow_change_loginname')
3665  );
3666  $ilSetting->set(
3667  'create_history_loginname',
3668  (int) $this->loginSettingsForm->getInput('create_history_loginname')
3669  );
3670  $ilSetting->set(
3671  'reuse_of_loginnames',
3672  (int) $this->loginSettingsForm->getInput('reuse_of_loginnames')
3673  );
3674  $ilSetting->set(
3675  'loginname_change_blocking_time',
3676  (int) $save_blocking_time_in_seconds
3677  );
3678 
3679  $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'));
3680  } else {
3681  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
3682  }
3683  } else {
3684  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('form_input_not_valid'));
3685  }
3686  $this->loginSettingsForm->setValuesByPost();
3687 
3688  $this->tpl->setVariable(
3689  'ADM_CONTENT',
3690  $this->loginSettingsForm->getHTML()
3691  );
3692  }
$valid
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ saveNewAccountMailObject()

ilObjUserFolderGUI::saveNewAccountMailObject ( )

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

References $DIC, ilObjectGUI\$lng, ilObjUserFolder\_deleteAccountMailAttachment(), ilObjUserFolder\_updateAccountMailAttachment(), ilObjUserFolder\_writeNewAccountMail(), ILIAS\Repository\ctrl(), ilLanguage\getInstalledLanguages(), ILIAS\Repository\lng(), and raiseErrorOnMissingWrite().

3365  : void
3366  {
3367  global $DIC;
3368 
3369  $lng = $DIC['lng'];
3370 
3371  $this->raiseErrorOnMissingWrite();
3372 
3373  $langs = $lng->getInstalledLanguages();
3374  foreach ($langs as $lang_key) {
3376  $lang_key,
3377  $this->user_request->getMailSubject($lang_key),
3378  $this->user_request->getMailSalutation("g", $lang_key),
3379  $this->user_request->getMailSalutation("f", $lang_key),
3380  $this->user_request->getMailSalutation("m", $lang_key),
3381  $this->user_request->getMailBody($lang_key)
3382  );
3383 
3384  if ($_FILES["att_" . $lang_key]["tmp_name"]) {
3386  $lang_key,
3387  $_FILES["att_" . $lang_key]["tmp_name"],
3388  $_FILES["att_" . $lang_key]["name"]
3389  );
3390  }
3391 
3392  if ($this->user_request->getMailAttDelete($lang_key)) {
3394  }
3395  }
3396 
3397  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
3398  $this->ctrl->redirect(
3399  $this,
3400  "newAccountMail"
3401  );
3402  }
static _writeNewAccountMail(string $a_lang, string $a_subject, string $a_sal_g, string $a_sal_f, string $a_sal_m, string $a_body)
static _updateAccountMailAttachment(string $a_lang, string $a_tmp_name, string $a_name)
Update account mail attachment.
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _deleteAccountMailAttachment(string $a_lang)
Delete account mail attachment.
getInstalledLanguages()
Get installed languages.
+ Here is the call graph for this function:

◆ searchResultHandler()

ilObjUserFolderGUI::searchResultHandler ( array  $a_usr_ids,
string  $a_cmd 
)

Handles multi command from repository search gui.

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

References ILIAS\Repository\lng(), and showActionConfirmation().

3777  : bool {
3778  if (!count($a_usr_ids)) {
3779  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
3780  return false;
3781  }
3782 
3783  $this->requested_ids = $a_usr_ids;
3784 
3785  // no real confirmation here
3786  if (stripos($a_cmd, "export") !== false) {
3787  $cmd = $a_cmd . "Object";
3788  return $this->$cmd();
3789  }
3790 
3791  return $this->showActionConfirmation(
3792  $a_cmd,
3793  true
3794  );
3795  }
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ searchUserAccessFilterCallable()

ilObjUserFolderGUI::searchUserAccessFilterCallable ( array  $a_user_ids)

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

References ilObjectGUI\$access, $DIC, ilObjectGUI\checkPermissionBool(), ilOrgUnitPositionAccessHandler\filterUserIdsByPositionOfCurrentUser(), ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, and USER_FOLDER_ID.

3755  : array // Missing array type.
3756  {
3757  global $DIC;
3758  $access = $DIC->access();
3759 
3760  if (!$this->checkPermissionBool("read_users")) {
3764  $a_user_ids
3765  );
3766  }
3767 
3768  return $a_user_ids;
3769  }
const USER_FOLDER_ID
Definition: constants.php:33
global $DIC
Definition: feed.php:28
filterUserIdsByPositionOfCurrentUser(string $pos_perm, int $ref_id, array $user_ids)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ setAccessRestrictionObject()

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

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

References initAccessRestrictionForm().

Referenced by confirmaccessRestrictObject(), and showActionConfirmation().

635  : bool {
636  if (!$a_form) {
637  $a_form = $this->initAccessRestrictionForm($a_from_search);
638  }
639  $this->tpl->setContent($a_form->getHTML());
640 
641  // #10963
642  return true;
643  }
initAccessRestrictionForm(bool $a_from_search=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubTabs()

ilObjUserFolderGUI::setSubTabs ( string  $a_tab)

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

References $DIC, and ILIAS\Repository\ctrl().

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

3496  : void
3497  {
3498  global $DIC;
3499 
3500  switch ($a_tab) {
3501  case "settings":
3502  $this->tabs_gui->addSubTabTarget(
3503  'general_settings',
3504  $this->ctrl->getLinkTarget(
3505  $this,
3506  'generalSettings'
3507  ),
3508  'generalSettings',
3509  get_class($this)
3510  );
3511  $this->tabs_gui->addSubTabTarget(
3512  "standard_fields",
3513  $this->ctrl->getLinkTarget(
3514  $this,
3515  'settings'
3516  ),
3517  array("settings", "saveGlobalUserSettings"),
3518  get_class($this)
3519  );
3520  $this->tabs_gui->addSubTabTarget(
3521  "user_defined_fields",
3522  $this->ctrl->getLinkTargetByClass(
3523  "ilcustomuserfieldsgui",
3524  "listUserDefinedFields"
3525  ),
3526  "listUserDefinedFields",
3527  get_class($this)
3528  );
3529  $this->tabs_gui->addSubTabTarget(
3530  "user_new_account_mail",
3531  $this->ctrl->getLinkTarget(
3532  $this,
3533  'newAccountMail'
3534  ),
3535  "newAccountMail",
3536  get_class($this)
3537  );
3538 
3539  $this->tabs_gui->addSubTabTarget(
3540  "starting_points",
3541  $this->ctrl->getLinkTargetByClass(
3542  "iluserstartingpointgui",
3543  "startingPoints"
3544  ),
3545  "startingPoints",
3546  get_class($this)
3547  );
3548 
3549  $this->tabs_gui->addSubTabTarget(
3550  "user_profile_info",
3551  $this->ctrl->getLinkTargetByClass(
3552  "ilUserProfileInfoSettingsGUI",
3553  ''
3554  ),
3555  "",
3556  "ilUserProfileInfoSettingsGUI"
3557  );
3558 
3559  #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"),
3560  # $this->ctrl->getLinkTargetByClass("ilaccountcodesgui"));
3561  break;
3562  }
3563  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ 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 2558 of file class.ilObjUserFolderGUI.php.

References $DIC, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilLanguage\loadLanguageModule(), raiseErrorOnMissingWrite(), ilGlobalTemplateInterface\setContent(), and setSubTabs().

Referenced by saveGlobalUserSettingsObject().

2558  : void
2559  {
2560  global $DIC;
2561 
2562  $tpl = $DIC['tpl'];
2563  $lng = $DIC['lng'];
2564  $ilTabs = $DIC['ilTabs'];
2565 
2566  $this->raiseErrorOnMissingWrite();
2567 
2568  $lng->loadLanguageModule("administration");
2569  $lng->loadLanguageModule("mail");
2570  $lng->loadLanguageModule("chatroom");
2571  $this->setSubTabs('settings');
2572  $ilTabs->activateTab('settings');
2573  $ilTabs->activateSubTab('standard_fields');
2574 
2575  $tab = new ilUserFieldSettingsTableGUI(
2576  $this,
2577  "settings"
2578  );
2579  if ($this->confirm_change) {
2580  $tab->setConfirmChange();
2581  }
2582  $tpl->setContent($tab->getHTML());
2583  }
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUserOwnerId()

ilObjUserFolderGUI::setUserOwnerId ( int  $a_id)

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

117  : void
118  {
119  $this->user_owner_id = $a_id;
120  }

◆ showActionConfirmation()

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

display activation confirmation screen

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

References $DIC, ilObjectGUI\$id, ilObjectGUI\$user, addToClipboardObject(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), getActionUserIds(), ilObjUser\getEmail(), ilObjUser\getFullname(), ilObjUser\getLastLogin(), ilObjUser\getLogin(), IL_CAL_DATETIME, ILIAS\Repository\lng(), mailObject(), setAccessRestrictionObject(), and ilObjectGUI\viewObject().

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

887  : bool {
888  global $DIC;
889 
890  $ilTabs = $DIC['ilTabs'];
891 
892  $user_ids = $this->getActionUserIds();
893  if (!$user_ids) {
894  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_checkbox'));
895  $this->viewObject();
896  return false;
897  }
898 
899  if (!$a_from_search) {
900  $ilTabs->activateTab("obj_usrf");
901  } else {
902  $ilTabs->activateTab("search_user_extended");
903  }
904 
905  if (strcmp(
906  $action,
907  "accessRestrict"
908  ) == 0) {
909  return $this->setAccessRestrictionObject(
910  null,
911  $a_from_search
912  );
913  }
914  if (strcmp(
915  $action,
916  "mail"
917  ) == 0) {
918  $this->mailObject();
919  return false;
920  }
921  if (strcmp($action, 'addToClipboard') === 0) {
922  $this->addToClipboardObject();
923  return false;
924  }
925 
926  unset($this->data);
927 
928  if (!$a_from_search) {
929  $cancel = "cancelUserFolderAction";
930  } else {
931  $cancel = "cancelSearchAction";
932  }
933 
934  // display confirmation message
935  $cgui = new ilConfirmationGUI();
936  $cgui->setFormAction($this->ctrl->getFormAction($this));
937  $cgui->setHeaderText($this->lng->txt("info_" . $action . "_sure"));
938  $cgui->setCancel(
939  $this->lng->txt("cancel"),
940  $cancel
941  );
942  $cgui->setConfirm(
943  $this->lng->txt("confirm"),
944  "confirm" . $action
945  );
946 
947  if ($a_from_search) {
948  $cgui->addHiddenItem(
949  "frsrch",
950  1
951  );
952  }
953 
954  foreach ($user_ids as $id) {
955  $user = new ilObjUser($id);
956 
957  $login = $user->getLastLogin();
958  if (!$login) {
959  $login = $this->lng->txt("never");
960  } else {
962  new ilDateTime(
963  $login,
965  )
966  );
967  }
968 
969  $caption = $user->getFullname() . " (" . $user->getLogin() . ")" . ", " .
970  $user->getEmail() . " - " . $this->lng->txt("last_login") . ": " . $login;
971 
972  $cgui->addItem(
973  "id[]",
974  $id,
975  $caption
976  );
977  }
978 
979  $this->tpl->setContent($cgui->getHTML());
980 
981  return true;
982  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getFullname(int $a_max_strlen=0)
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
getActionUserIds()
Get selected items for table action.
global $DIC
Definition: feed.php:28
setAccessRestrictionObject(?ilPropertyFormGUI $a_form=null, bool $a_from_search=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showFieldChangeComponentsListeningConfirmDialog()

ilObjUserFolderGUI::showFieldChangeComponentsListeningConfirmDialog ( array  $interestedChangeListeners)
Parameters
InterestedUserFieldChangeListener[]$interestedChangeListeners

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

References $post, ilObjectGUI\$tpl, ILIAS\Repository\ctrl(), ilGlobalTemplateInterface\get(), getTranslationForField(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\parseCurrentBlock(), ilGlobalTemplateInterface\setCurrentBlock(), and ilGlobalTemplateInterface\setVariable().

2828  : void {
2829  $post = $this->dic->http()->request()->getParsedBody();
2830  $confirmDialog = new ilConfirmationGUI();
2831  $confirmDialog->setHeaderText($this->lng->txt("usr_field_change_components_listening"));
2832  $confirmDialog->setFormAction($this->ctrl->getFormActionByClass(
2833  [self::class],
2834  "settings"
2835  ));
2836  $confirmDialog->setConfirm($this->lng->txt("confirm"), "confirmUsrFieldChangeListeners");
2837  $confirmDialog->setCancel($this->lng->txt("cancel"), "settings");
2838 
2839  $tpl = new ilTemplate(
2840  "tpl.usr_field_change_listener_confirm.html",
2841  true,
2842  true,
2843  "Services/User"
2844  );
2845 
2846  foreach ($interestedChangeListeners as $interestedChangeListener) {
2847  $tpl->setVariable("FIELD_NAME", $interestedChangeListener->getName());
2848  foreach ($interestedChangeListener->getAttributes() as $attribute) {
2849  $tpl->setVariable("ATTRIBUTE_NAME", $attribute->getName());
2850  foreach ($attribute->getComponents() as $component) {
2851  $tpl->setVariable("COMPONENT_NAME", $component->getComponentName());
2852  $tpl->setVariable("DESCRIPTION", $component->getDescription());
2853  $tpl->setCurrentBlock("component");
2854  $tpl->parseCurrentBlock("component");
2855  }
2856  $tpl->setCurrentBlock("attribute");
2857  $tpl->parseCurrentBlock("attribute");
2858  }
2859  $tpl->setCurrentBlock("field");
2860  $tpl->parseCurrentBlock("field");
2861  }
2862 
2863  $confirmDialog->addItem("", 0, $tpl->get());
2864 
2865  foreach ($post["chb"] as $postVar => $value) {
2866  $confirmDialog->addHiddenItem("chb[$postVar]", $value);
2867  }
2868  foreach ($post["select"] as $postVar => $value) {
2869  $confirmDialog->addHiddenItem("select[$postVar]", $value);
2870  }
2871  foreach ($post["current"] as $postVar => $value) {
2872  $confirmDialog->addHiddenItem("current[$postVar]", $value);
2873  }
2874  $this->tpl->setContent($confirmDialog->getHTML());
2875  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
$post
Definition: ltitoken.php:49
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showLoginnameSettingsObject()

ilObjUserFolderGUI::showLoginnameSettingsObject ( )

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

References $DIC, $ilSetting, initLoginSettingsForm(), and ILIAS\Repository\int().

3565  : void
3566  {
3567  global $DIC;
3568 
3569  $ilSetting = $DIC['ilSetting'];
3570 
3571  $show_blocking_time_in_days = (int) $ilSetting->get('loginname_change_blocking_time') / 86400;
3572 
3573  $this->initLoginSettingsForm();
3574  $this->loginSettingsForm->setValuesByArray(
3575  array(
3576  'allow_change_loginname' => (bool) $ilSetting->get('allow_change_loginname'),
3577  'create_history_loginname' => (bool) $ilSetting->get('create_history_loginname'),
3578  'reuse_of_loginnames' => (bool) $ilSetting->get('reuse_of_loginnames'),
3579  'loginname_change_blocking_time' => (float) $show_blocking_time_in_days
3580  )
3581  );
3582 
3583  $this->tpl->setVariable(
3584  'ADM_CONTENT',
3585  $this->loginSettingsForm->getHTML()
3586  );
3587  }
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ showPossibleSubObjects()

ilObjUserFolderGUI::showPossibleSubObjects ( )
protected

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

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

References $d, $DIC, $i, ilLegacyFormElementsUtil\formSelect(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

425  : void
426  {
427  global $DIC;
428 
429  $rbacsystem = $DIC['rbacsystem'];
430  $subobj = null;
431 
432  $d = $this->obj_definition->getCreatableSubObjects($this->object->getType());
433 
434  if (!$rbacsystem->checkAccess(
435  'create_usr',
436  $this->object->getRefId()
437  )) {
438  unset($d["usr"]);
439  }
440 
441  if (count($d) > 0) {
442  foreach ($d as $row) {
443  $count = 0;
444  if ($row["max"] > 0) {
445  //how many elements are present?
446  for ($i = 0, $iMax = count($this->data["ctrl"]); $i < $iMax; $i++) {
447  if ($this->data["ctrl"][$i]["type"] == $row["name"]) {
448  $count++;
449  }
450  }
451  }
452  if ($row["max"] == "" || $count < $row["max"]) {
453  $subobj[] = $row["name"];
454  }
455  }
456  }
457 
458  if (is_array($subobj)) {
459  //build form
461  12,
462  "new_type",
463  $subobj
464  );
465  $this->tpl->setCurrentBlock("add_object");
466  $this->tpl->setVariable(
467  "SELECT_OBJTYPE",
468  $opts
469  );
470  $this->tpl->setVariable(
471  "BTN_NAME",
472  "create"
473  );
474  $this->tpl->setVariable(
475  "TXT_ADD",
476  $this->lng->txt("add")
477  );
478  $this->tpl->parseCurrentBlock();
479  }
480  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: feed.php:28
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ userActionObject()

ilObjUserFolderGUI::userActionObject ( )

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

References raiseErrorOnMissingWrite(), and showActionConfirmation().

1037  : void
1038  {
1039  $this->raiseErrorOnMissingWrite();
1040  $this->showActionConfirmation($this->user_request->getSelectedAction());
1041  }
showActionConfirmation(string $action, bool $a_from_search=false)
display activation confirmation screen
+ Here is the call graph for this function:

◆ usrExportCsvObject()

ilObjUserFolderGUI::usrExportCsvObject ( )
protected

Export csv.

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

References ilObjectGUI\checkPermissionBool(), checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileLegacy(), ilObjUserFolder\FILE_TYPE_CSV, getActionUserIds(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

3904  : void
3905  {
3906  $user_ids = $this->getActionUserIds();
3907  if (!$user_ids) {
3908  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
3909  $this->ctrl->redirect(
3910  $this,
3911  'view'
3912  );
3913  }
3914 
3915  if ($this->checkPermissionBool("write,read_users")) {
3916  $this->object->buildExportFile(
3918  $user_ids
3919  );
3920  $this->ctrl->redirectByClass(
3921  "ilobjuserfoldergui",
3922  "export"
3923  );
3924  } elseif ($this->checkUserManipulationAccessBool()) {
3925  $fullname = $this->object->buildExportFile(
3927  $user_ids,
3928  true
3929  );
3931  $fullname,
3932  $this->object->getExportFilename(ilObjUserFolder::FILE_TYPE_CSV),
3933  '',
3934  false,
3935  true
3936  );
3937  }
3938  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
getActionUserIds()
Get selected items for table action.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ usrExportX86Object()

ilObjUserFolderGUI::usrExportX86Object ( )
protected

Export excel.

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

References ilObjectGUI\checkPermissionBool(), checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileLegacy(), ilObjUserFolder\FILE_TYPE_EXCEL, getActionUserIds(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

3865  : void
3866  {
3867  $user_ids = $this->getActionUserIds();
3868  if (!$user_ids) {
3869  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
3870  $this->ctrl->redirect(
3871  $this,
3872  'view'
3873  );
3874  }
3875 
3876  if ($this->checkPermissionBool('write,read_users')) {
3877  $this->object->buildExportFile(
3879  $user_ids
3880  );
3881  $this->ctrl->redirectByClass(
3882  "ilobjuserfoldergui",
3883  "export"
3884  );
3885  } elseif ($this->checkUserManipulationAccessBool()) {
3886  $fullname = $this->object->buildExportFile(
3888  $user_ids,
3889  true
3890  );
3892  $fullname . '.xlsx',
3893  $this->object->getExportFilename(ilObjUserFolder::FILE_TYPE_EXCEL) . '.xlsx',
3894  '',
3895  false,
3896  true
3897  );
3898  }
3899  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
getActionUserIds()
Get selected items for table action.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ usrExportXmlObject()

ilObjUserFolderGUI::usrExportXmlObject ( )
protected

Export xml.

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

References ilObjectGUI\checkPermissionBool(), checkUserManipulationAccessBool(), ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileLegacy(), ilObjUserFolder\FILE_TYPE_XML, getActionUserIds(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

3943  : void
3944  {
3945  $user_ids = $this->getActionUserIds();
3946  if (!$user_ids) {
3947  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
3948  $this->ctrl->redirect(
3949  $this,
3950  'view'
3951  );
3952  }
3953  if ($this->checkPermissionBool("write,read_users")) {
3954  $this->object->buildExportFile(
3956  $user_ids
3957  );
3958  $this->ctrl->redirectByClass(
3959  "ilobjuserfoldergui",
3960  "export"
3961  );
3962  } elseif ($this->checkUserManipulationAccessBool()) {
3963  $fullname = $this->object->buildExportFile(
3965  $user_ids,
3966  true
3967  );
3969  $fullname,
3970  $this->object->getExportFilename(ilObjUserFolder::FILE_TYPE_XML),
3971  '',
3972  false,
3973  true
3974  );
3975  }
3976  }
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
getActionUserIds()
Get selected items for table action.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ verifyXmlData()

ilObjUserFolderGUI::verifyXmlData ( ilUserImportParser  $import_parser)

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

References $DIC, ILIAS\Repository\ctrl(), ilUserImportParser\getErrorLevel(), getImportDir(), ilUserImportParser\getProtocolAsHTML(), IL_IMPORT_FAILURE, IL_IMPORT_SUCCESS, IL_IMPORT_WARNING, and ILIAS\Repository\lng().

Referenced by initUserRoleAssignmentForm().

1658  : string
1659  {
1660  global $DIC;
1661 
1662  $filesystem = $DIC->filesystem()->storage();
1663 
1664  $import_dir = $this->getImportDir();
1665  switch ($import_parser->getErrorLevel()) {
1666  case IL_IMPORT_SUCCESS:
1667  return '';
1668  case IL_IMPORT_WARNING:
1669  return $import_parser->getProtocolAsHTML($this->lng->txt("verification_warning_log"));
1670  case IL_IMPORT_FAILURE:
1671  $filesystem->deleteDir($import_dir);
1672  $this->tpl->setOnScreenMessage(
1673  'failure',
1674  $this->lng->txt('verification_failed') . $import_parser->getProtocolAsHTML(
1675  $this->lng->txt('verification_failure_log')
1676  ),
1677  true
1678  );
1679  $this->ctrl->redirectByClass(self::class, 'importUserForm');
1680  }
1681  }
const IL_IMPORT_FAILURE
const IL_IMPORT_WARNING
global $DIC
Definition: feed.php:28
const IL_IMPORT_SUCCESS
getProtocolAsHTML(string $a_log_title)
Returns the protocol as a HTML table.
getErrorLevel()
Returns the error level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewObject()

ilObjUserFolderGUI::viewObject ( bool  $reset_filter = false)

list users

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

References ilObjectGUI\$access, $DIC, $ilSetting, ilObjectGUI\$tpl, ilLocalUser\_getAllUserIds(), ilLocalUser\_getUserFolderId(), ilRBACAccessHandler\checkAccess(), ilOrgUnitPositionAndRBACAccessHandler\checkRbacOrPositionPermissionAccess(), ILIAS\Repository\ctrl(), ilOrgUnitPositionAndRBACAccessHandler\filterUserIdsByRbacOrPositionOfCurrentUser(), ilObjUser\getFirstLettersOfLastnames(), ilLinkButton\getInstance(), ilUserTableGUI\MODE_USER_FOLDER, ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, ilGlobalTemplateInterface\setContent(), and USER_FOLDER_ID.

282  : void {
283  global $DIC;
284 
285  $rbacsystem = $DIC['rbacsystem'];
286  $ilToolbar = $DIC->toolbar();
287  $tpl = $DIC['tpl'];
288  $ilSetting = $DIC['ilSetting'];
289  $access = $DIC->access();
290  $user_filter = null;
291 
292  if ($rbacsystem->checkAccess('create_usr', $this->object->getRefId())
293  || $rbacsystem->checkAccess('cat_administrate_users', $this->object->getRefId())) {
294  $button = ilLinkButton::getInstance();
295  $button->setCaption("usr_add");
296  $button->setUrl(
297  $this->ctrl->getLinkTarget(
298  $this,
299  "addUser"
300  )
301  );
302  $ilToolbar->addButtonInstance($button);
303 
304  $button = ilLinkButton::getInstance();
305  $button->setCaption("import_users");
306  $button->setUrl(
307  $this->ctrl->getLinkTarget(
308  $this,
309  "importUserForm"
310  )
311  );
312  $ilToolbar->addButtonInstance($button);
313  }
314 
315  if (
317  'read_users',
318  '',
320  ) &&
322  'read_users',
325  )) {
328  'read_users',
331  $users
332  );
333  }
334 
335  // alphabetical navigation
336  if ((int) $ilSetting->get('user_adm_alpha_nav')) {
337  if (count($ilToolbar->getItems()) > 0) {
338  $ilToolbar->addSeparator();
339  }
340 
341  // alphabetical navigation
342  $ai = new ilAlphabetInputGUI(
343  "",
344  "first"
345  );
346  $ai->setLetters(ilObjUser::getFirstLettersOfLastnames($user_filter));
347  $ai->setParentCommand(
348  $this,
349  "chooseLetter"
350  );
351  $ai->setHighlighted($this->user_request->getLetter());
352  $ilToolbar->addInputItem(
353  $ai,
354  true
355  );
356  }
357 
358  $utab = new ilUserTableGUI(
359  $this,
360  "view",
362  false
363  );
364  $utab->addFilterItemValue(
365  'user_ids',
366  $user_filter
367  );
368  $utab->getItems();
369 
370  $tpl->setContent($utab->getHTML());
371  }
static _getAllUserIds(int $a_filter=0)
const USER_FOLDER_ID
Definition: constants.php:33
static getFirstLettersOfLastnames(?array $user_ids=null)
Get first letters of all lastnames.
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static _getUserFolderId()
global $ilSetting
Definition: privfeed.php:17
ilAccessHandler $access
+ Here is the call graph for this function:

Field Documentation

◆ $confirm_change

int ilObjUserFolderGUI::$confirm_change = 0
protected

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

◆ $dic

Container ilObjUserFolderGUI::$dic
private

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

◆ $form

ilPropertyFormGUI ilObjUserFolderGUI::$form
protected

◆ $log

ilLogger ilObjUserFolderGUI::$log
protected

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

◆ $loginSettingsForm

ilPropertyFormGUI ilObjUserFolderGUI::$loginSettingsForm
protected

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

◆ $requested_ids

array ilObjUserFolderGUI::$requested_ids
protected

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

◆ $selected_action

string ilObjUserFolderGUI::$selected_action
protected

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

◆ $user_owner_id

int ilObjUserFolderGUI::$user_owner_id = 0
protected

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

◆ $user_request

ILIAS User StandardGUIRequest ilObjUserFolderGUI::$user_request
protected

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

◆ $user_settings_config

ilUserSettingsConfig ilObjUserFolderGUI::$user_settings_config
protected

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

Referenced by saveGlobalUserSettingsObject().

◆ $usrFieldChangeListenersAccepted

bool ilObjUserFolderGUI::$usrFieldChangeListenersAccepted = false
private

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

◆ changeable

const ilObjUserFolderGUI::changeable
Initial value:
=> "changeable",
"searchable" => "header_searchable",
"required" => "required_field",
"export" => "export",
"course_export" => "course_export",
'group_export' => 'group_export',
"visib_reg" => "header_visible_registration",
'visib_lua' => 'usr_settings_visib_lua',
'changeable_lua' => 'usr_settings_changeable_lua'
]

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

◆ USER_FIELD_TRANSLATION_MAPPING

const ilObjUserFolderGUI::USER_FIELD_TRANSLATION_MAPPING
Initial value:
= [
"visible" => "user_visible_in_profile"

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

Referenced by ilUserFieldSettingsTableGUI\fillRow(), and ILIAS\Services\User\InterestedUserFieldAttribute\getNameTranslation().


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