fixed search_username when using Samba 2.x and 3 in the same suffix
This commit is contained in:
parent
1f00f7cf2f
commit
baec410581
|
@ -115,11 +115,11 @@ class Ldap{
|
|||
function search_username($name) {
|
||||
if ($this->conf->get_samba3() == "yes") {
|
||||
// users have the attribute "posixAccount" or "sambaSamAccount" and uid $name
|
||||
$filter = "(&(|(objectClass=posixAccount) (objectClass=sambaSamAccount)) (uid=$name))";
|
||||
$filter = "(&(objectClass=sambaSamAccount) (uid=$name))";
|
||||
}
|
||||
else {
|
||||
// users have the attribute "posixAccount" or "sambaAccount" and uid $name
|
||||
$filter = "(&(|(objectClass=posixAccount) (objectClass=sambaAccount)) (uid=$name))";
|
||||
$filter = "(&(objectClass=sambaAccount) (uid=$name))";
|
||||
}
|
||||
$attrs = array();
|
||||
$sr = @ldap_search($this->server, $this->conf->get_UserSuffix(), $filter, $attrs);
|
||||
|
|
|
@ -51,7 +51,7 @@ else {
|
|||
echo "<html><head><title>userlink</title>\n";
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
|
||||
echo "</head><body>\n";
|
||||
echo StatusMessage("ERROR", "", _("This user was not found or is invalid!") . " " . $user);
|
||||
echo StatusMessage("ERROR", "", _("This user was not found!") . " (" . $user . ")");
|
||||
echo ("</body></html>\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue