Lines Matching +full:user -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

47                 $this->getConf('user'),
64 …['select-user', 'select-user-groups', 'select-groups', 'insert-user', 'insert-group', 'join-group']
69 ['select-user', 'select-user-groups', 'select-groups', 'leave-group', 'delete-user']
74 ['select-user', 'select-user-groups', 'update-user-login']
79 ['select-user', 'select-user-groups', 'update-user-pass']
84 ['select-user', 'select-user-groups', 'update-user-info:name']
89 ['select-user', 'select-user-groups', 'update-user-info:mail']
94 …['select-user', 'select-user-groups', 'select-groups', 'leave-group', 'join-group', 'insert-group']
116 * Check user+password
118 * @param string $user the user name
122 public function checkPass($user, $pass) argument
125 $userdata = $this->selectUser($user);
152 * Return user info
154 * Returns info about the given user needs to contain
157 * name string full name of the user
158 * mail string email addres of the user
159 * grps array list of groups the user is in
161 * @param string $user the user name
163 * @return array|bool containing user data or false
165 public function getUserData($user, $requireGroups = true) argument
167 $data = $this->selectUser($user);
182 * Create a new User [implement only where required/possible]
184 * Returns false if the user already exists, null when an error
187 * The new user HAS TO be added to the default group by this
192 * @param string $user
199 public function createUser($user, $clear, $name, $mail, $grps = null) argument
203 if (($info = $this->getUserData($user, false)) !== false) {
205 return false; // user already exists
213 …$userdata = ['user' => $user, 'clear' => $clear, 'hash' => $hash, 'name' => $name, 'mail' => $mail…
218 // insert the user
219 $ok = $this->query($this->getConf('insert-user'), $userdata);
221 $userdata = $this->getUserData($user, false);
234 // add user to the groups
252 * Modify user data
254 * @param string $user nick of the user to be changed
258 public function modifyUser($user, $changes) argument
263 $olddata = $this->getUserData($user);
267 // changing the user name?
268 if (isset($changes['user'])) {
269 if ($this->getUserData($changes['user'], false)) goto FAIL;
271 $params['newlogin'] = $changes['user'];
273 $ok = $this->query($this->getConf('update-user-login'), $params);
283 $ok = $this->query($this->getConf('update-user-pass'), $params);
293 $ok = $this->query($this->getConf('update-user-info'), $params);
353 foreach ($users as $user) {
354 if ($this->deleteUser($user)) $count++;
360 * Bulk retrieval of user data [implement only where required/possible]
364 * @param int $start index of first user to be returned
375 foreach (['user', 'name', 'mail', 'group'] as $key) {
391 if (!isset($row['user'])) {
392 … $this->debugMsg("list-users statement did not return 'user' attribute", -1, __LINE__);
395 $users[] = $this->getUserData($row['user']);
404 * Return a count of the number of user which meet $filter criteria
414 foreach (['user', 'name', 'mail', 'group'] as $key) {
467 * Select data of a specified user
469 * @param string $user the user name
470 * @return bool|array user data, false on error
472 protected function selectUser($user) argument
474 $sql = $this->getConf('select-user');
476 $result = $this->query($sql, [':user' => $user]);
480 $this->debugMsg('Found more than one matching user', -1, __LINE__);
487 if (!isset($data['user'])) {
488 $this->debugMsg("Statement did not return 'user' attribute", -1, __LINE__);
509 * Delete a user after removing all their group memberships
511 * @param string $user
512 * @return bool true when the user was deleted
514 protected function deleteUser($user) argument
518 $userdata = $this->getUserData($user);
529 $ok = $this->query($this->getConf('delete-user'), $userdata);
541 * Select all groups of a user
549 $sql = $this->getConf('select-user-groups');
557 … $this->debugMsg("No 'group' field returned in select-user-groups statement", -1, __LINE__);
563 … $this->debugMsg("select-user-groups statement did not return a list of result", -1, __LINE__);
613 * Adds the user to the group
615 * @param array $userdata all the user data
629 * Removes the user from the group
631 * @param array $userdata all the user data