Lines Matching +full:user -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)
33 * // warn user about expiring password this many days in advance:
64 * @var array user listing cache
115 // trust the incoming user
149 * Check user+password [required auth function]
151 * Checks if the given user exists and the given
156 * @param string $user
160 public function checkPass($user, $pass) argument
164 $INPUT->server->str('REMOTE_USER') == $user &&
168 $adldap = $this->initAdLdap($this->getUserDomain($user));
172 return $adldap->authenticate($this->getUserName($user), $pass);
180 * Return user info [required auth function]
182 * Returns info about the given user needs to contain
185 * name string full name of the user
186 * mail string email address of the user
187 * grps array list of groups the user is in
200 * @param string $user
204 public function getUserData($user, $requireGroups = true) argument
210 $adldap = $this->initAdLdap($this->getUserDomain($user));
212 if ($user == '') return false;
221 //get info for given user
222 $result = $adldap->user()->info($this->getUserName($user), $fields);
227 //general user info
246 …$info['grps'] = $adldap->user()->groups($this->getUserName($user), (bool) $this->opts['recursive_g…
261 // add the user's domain to the groups
262 $domain = $this->getUserDomain($user);
270 $expiry = $adldap->user()->passwordExpiry($user);
275 // if this is the current user, warn him (once per request only)
277 ($INPUT->server->str('REMOTE_USER') == $user) &&
317 * Sanitize user names
319 * Normalizes domain parts, does not modify the user name itself (unlike cleanGroup)
322 * @param string $user
325 public function cleanUser($user) argument
330 [$dom, $user] = sexplode('\\', $user, 2, '');
331 if (!$user) $user = $dom;
333 [$user, $dom] = sexplode('@', $user, 2, '');
338 $user = PhpString::strtolower(trim($user));
349 if ($domain) $user = "$user@$domain";
350 return $user;
381 if (isset($filter['user'])) {
382 $result .= ')(samAccountName=*' . $adldapUtils->ldapSlashes($filter['user']) . '*';
383 unset($filter['user']);
394 * Return a count of the number of user which meet $filter criteria
407 $result = $adldap->user()->all();
410 $result = $adldap->user()->all(false, $searchString);
453 if (isset($filter['user'])) {
454 $result .= 'user-' . $filter['user'];
489 foreach ($this->users as $user => &$info) {
494 $info = $this->getUserData($user);
496 if ($this->filter($user, $info)) {
497 $this->grpsusers[$this->filterToString($filter)][$user] = $info;
505 * Bulk retrieval of user data
509 * @param int $start index of first user to be returned
520 //get info for given user
521 $result = $adldap->user()->all(false, $this->constructSearchString($filter));
535 foreach ($this->users as $user => &$info) {
540 $info = $this->getUserData($user);
542 $result[$user] = $info;
563 foreach ($this->grpsusers[$this->filterToString($filter)] as $user => &$info) {
567 $result[$user] = $info;
575 * Modify user data
577 * @param string $user nick of the user to be changed
581 public function modifyUser($user, $changes) argument
584 $adldap = $this->initAdLdap($this->getUserDomain($user));
593 $return = $adldap->user()->password($this->getUserName($user), $changes['pass']);
601 // changing user data
615 $return &= $adldap->user()->modify($this->getUserName($user), $adchanges);
630 * Eg. the one of the logged in user. It falls back to the default
660 * Get the domain part from a user
662 * @param string $user
665 public function getUserDomain($user) argument
667 [, $domain] = sexplode('@', $user, 2, '');
672 * Get the user part from a user
674 * When an account suffix is set, we strip the domain part from the user
676 * @param string $user
679 public function getUserName($user) argument
682 [$user] = explode('@', $user, 2);
684 return $user;
726 // adLDAP expects empty user/pass as NULL, we're less strict FS#2781
730 // user listing needs admin priviledges
767 * Check provided user and userinfo for matching patterns
773 * @param string $user
777 protected function filter($user, $info) argument
780 if ($item == 'user') {
781 if (!preg_match($pattern, $user)) return false;