From a55b1a5163395248d4d6a2cab5c4dbd97aef107d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 27 Jun 2007 05:26:46 +0000 Subject: [PATCH] "fixed bug reported from sim : _read_group not searching for posixGroup, which makes problems if you have identical numbers and context for users and groups also added a filter for objectclass=posixAccount to _read_user" --- phpgwapi/inc/class.accounts_ldap.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 1fbf776f06..f8d0b488a1 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -399,7 +399,7 @@ class accounts_backend */ function _read_group($account_id) { - $sri = ldap_search($this->ds, $this->group_context, 'gidnumber=' . abs($account_id), + $sri = ldap_search($this->ds, $this->group_context,'(&(objectClass=posixGroup)(gidnumber=' . abs($account_id).'))', array('dn','gidnumber','cn','objectclass','mail')); $data = ldap_get_entries($this->ds, $sri); @@ -443,7 +443,7 @@ class accounts_backend */ function _read_user($account_id) { - $sri = ldap_search($this->ds, $this->user_context, 'uidnumber=' . (int)$account_id, + $sri = ldap_search($this->ds, $this->user_context, '(&(objectclass=posixAccount)(uidnumber=' . (int)$account_id.'))', array('dn','uidnumber','uid','gidnumber','givenname','sn','cn','mail','userpassword', 'shadowexpire','shadowlastchange','homedirectory','loginshell'));