Lines Matching refs:user

31             $this->addUserGroups($INPUT->str('user'), $INPUT->str('groups'));
35 $this->deleteUser($INPUT->str('user'));
39 $this->editUserGroups($INPUT->str('user'), $INPUT->str('groups'));
45 $INPUT->remove('user');
50 // load user data if requested
52 $INPUT->set('user', $auth->cleanUser($INPUT->str('loaduser')));
70 * Add groups to a user
72 * @param string $user user name
76 protected function addUserGroups($user, $groups)
81 $user = $auth->cleanUser($user);
87 if ($user && $groups) {
88 $this->virtualGroups->addGroupsToUser($user, $groups);
106 static fn($user) => $auth->cleanUser($user),
116 * Delete a user
118 * @param string $user user name
121 protected function deleteUser($user)
126 $user = $auth->cleanUser($user);
128 if ($user) {
129 $this->virtualGroups->removeUser($user);
152 * Set the groups of a user
154 * @param string $user user name
158 protected function editUserGroups($user, $groups)
163 $user = $auth->cleanUser($user);
169 if ($user && $groups) {
170 $this->virtualGroups->setUserGroups($user, $groups);
188 static fn($user) => $auth->cleanUser($user),
246 * Print the by user tab
263 echo ' <th class="user">' . hsc($this->getLang('user')) . '</th>';
268 foreach ($this->virtualGroups->getUserStructure() as $user => $groups) {
270 echo ' <td>' . hsc($user) . '</td>';
273 echo $this->buttonDeleteUser($user);
278 'loaduser' => $user
308 echo ' <th class="user">' . hsc($this->getLang('users')) . '</th>';
334 * Return the form to add groups to a user
345 $form->addTextInput('user', $this->getLang('user'))->attr('placeholder', $this->getLang('user'));
353 * Return the form to edit the groups of a user
364 $form->addTextInput('user', $this->getLang('user'))->attr('readonly', 'readonly');
372 * Return the form to delete a user
376 protected function buttonDeleteUser($user)
382 $form->setHiddenField('user', $user);