search_username now returns Unix-only accounts, too

This commit is contained in:
Roland Gruber 2003-09-21 19:32:15 +00:00
parent ef5026aadb
commit 15da8f76f0
1 changed files with 1 additions and 8 deletions

View File

@ -123,14 +123,7 @@ class Ldap{
// searches LDAP for a specific user name
// and returns its DN entry
function search_username($name) {
if ($this->conf->is_samba3()) {
// users have the attribute "posixAccount" or "sambaSamAccount" and uid $name
$filter = "(&(objectClass=sambaSamAccount) (uid=$name))";
}
else {
// users have the attribute "posixAccount" or "sambaAccount" and uid $name
$filter = "(&(objectClass=sambaAccount) (uid=$name))";
}
$filter = "(uid=$name)";
$attrs = array();
$sr = @ldap_search($this->server, $this->conf->get_UserSuffix(), $filter, $attrs);
if ($sr) {