Lines Matching defs:info
179 * Return user info [required auth function]
181 * Returns info about the given user needs to contain
220 //get info for given user
221 $result = $adldap->user()->info($this->getUserName($user), $fields);
226 //general user info
227 $info = [];
228 $info['name'] = $result[0]['displayname'][0];
229 $info['mail'] = $result[0]['mail'][0];
230 $info['uid'] = $result[0]['samaccountname'][0];
231 $info['dn'] = $result[0]['dn'];
233 $info['lastpwd'] = $result[0]['pwdlastset'][0] / 10_000_000 - 11_644_473_600;
235 $info['expires'] = !($result[0]['useraccountcontrol'][0] & 0x10000); //ADS_UF_DONT_EXPIRE_PASSWD
240 $info[$field] = $result[0][strtolower($field)][0];
245 $info['grps'] = $adldap->user()->groups($this->getUserName($user), (bool) $this->opts['recursive_groups']);
247 if (is_array($info['grps'])) {
248 foreach ($info['grps'] as $ndx => $group) {
249 $info['grps'][$ndx] = $this->cleanGroup($group);
252 $info['grps'] = [];
256 if (!in_array($conf['defaultgroup'], $info['grps'])) {
257 $info['grps'][] = $conf['defaultgroup'];
262 if ($domain && !in_array("domain-$domain", $info['grps'])) {
263 $info['grps'][] = $this->cleanGroup("domain-$domain");
267 if ($info['expires'] && $this->conf['expirywarn']) {
271 $info['expiresat'] = $expiry['expiryts'];
272 $info['expiresin'] = round(($info['expiresat'] - time()) / (24 * 60 * 60));
277 ($info['expiresin'] <= $this->conf['expirywarn']) &&
280 $msg = sprintf($this->getLang('authpwdexpire'), $info['expiresin']);
294 return $info;
488 foreach ($this->users as $user => &$info) {
492 if ($info === false) {
493 $info = $this->getUserData($user);
495 if ($this->filter($user, $info)) {
496 $this->grpsusers[$this->filterToString($filter)][$user] = $info;
519 //get info for given user
534 foreach ($this->users as $user => &$info) {
538 if ($info === false) {
539 $info = $this->getUserData($user);
541 $result[$user] = $info;
562 foreach ($this->grpsusers[$this->filterToString($filter)] as $user => &$info) {
566 $result[$user] = $info;
773 * @param array $info
776 protected function filter($user, $info)
782 if (!count(preg_grep($pattern, $info['grps']))) return false;
783 } elseif (!preg_match($pattern, $info[$item])) {