Lines Matching refs:username

60     * @param string $username A user's AD username
65 public function authenticate($username, $password, $preventRebind = false) {
66 return $this->adldap->authenticate($username, $password, $preventRebind);
80 if (!array_key_exists("username", $attributes)){ return "Missing compulsory field [username]"; }
100 $add["samaccountname"][0] = $attributes["username"];
167 * @param string $username The username to delete (please be careful here!)
168 * @param bool $isGUID Is the username a GUID or a samAccountName
171 public function delete($username, $isGUID = false)
173 $userinfo = $this->info($username, array("*"), $isGUID);
185 * @param string $username The username to query
187 * @param bool $isGUID Is the username passed a GUID or a samAccountName
190 public function groups($username, $recursive = NULL, $isGUID = false)
192 if ($username === NULL) { return false; }
197 $info = @$this->info($username, array("memberof", "primarygroupid"), $isGUID);
213 * @param string $username The username to query
215 * @param bool $isGUID Is the username passed a GUID or a samAccountName
218 public function info($username, $fields = NULL, $isGUID = false)
220 if ($username === NULL) { return false; }
224 $username = $this->adldap->utilities()->strGuidToHex($username);
225 $filter = "objectguid=" . $username;
227 else if (strstr($username, "@")) {
228 $filter = "userPrincipalName=" . $username;
231 $filter = "samaccountname=" . $username;
268 * @param string $username The username to query
270 * @param bool $isGUID Is the username passed a GUID or a samAccountName
273 public function infoCollection($username, $fields = NULL, $isGUID = false)
275 if ($username === NULL) { return false; }
278 $info = $this->info($username, $fields, $isGUID);
290 * @param string $username The username to query
293 * @param bool $isGUID Is the username passed a GUID or a samAccountName
296 public function inGroup($username, $group, $recursive = NULL, $isGUID = false)
298 if ($username === NULL) { return false; }
304 $groups = $this->groups($username, $recursive, $isGUID);
317 * @param string $username The username to query
318 * @param book $isGUID Is the username passed a GUID or a samAccountName
322 public function passwordExpiry($username, $isGUID = false)
324 if ($username === NULL) { return "Missing compulsory field [username]"; }
328 $userInfo = $this->info($username, array("pwdlastset", "useraccountcontrol"), $isGUID);
389 * @param string $username The username to query
391 * @param bool $isGUID Is the username passed a GUID or a samAccountName
394 public function modify($username, $attributes, $isGUID = false)
396 if ($username === NULL) { return "Missing compulsory field [username]"; }
402 $userDn = $this->dn($username, $isGUID);
438 * @param string $username The username to disable
439 * @param bool $isGUID Is the username passed a GUID or a samAccountName
442 public function disable($username, $isGUID = false)
444 if ($username === NULL) { return "Missing compulsory field [username]"; }
446 $result = $this->modify($username, $attributes, $isGUID);
455 * @param string $username The username to enable
456 * @param bool $isGUID Is the username passed a GUID or a samAccountName
459 public function enable($username, $isGUID = false)
461 if ($username === NULL) { return "Missing compulsory field [username]"; }
463 $result = $this->modify($username, $attributes, $isGUID);
472 * @param string $username The username to modify
474 * @param bool $isGUID Is the username passed a GUID or a samAccountName
477 public function password($username, $password, $isGUID = false)
479 if ($username === NULL) { return false; }
486 $userDn = $this->dn($username, $isGUID);
530 * @param string $username The username
531 * @param bool $isGUID Is the username passed a GUID or a samAccountName
534 public function dn($username, $isGUID=false)
536 $user = $this->info($username, array("cn"), $isGUID);
579 * Converts a username (samAccountName) to a GUID
581 * @param string $username The username to query
584 public function usernameToGuid($username)
587 if ($username === null){ return "Missing compulsory field [username]"; }
589 $filter = "samaccountname=" . $username;
644 * @param string $username The username to move (please be careful here!)
649 public function move($username, $container)
652 if ($username === null) { return "Missing compulsory field [username]"; }
656 $userInfo = $this->info($username, array("*"));
658 $newRDn = "cn=" . $username;
672 * @param string $username
675 public function getLastLogon($username) {
677 if ($username === null) { return "Missing compulsory field [username]"; }
678 $userInfo = $this->info($username, array("lastLogonTimestamp"));