From a4a65ffcd57928ffdda874f781e063889fb6aa32 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 2 Sep 2001 13:53:52 +0000 Subject: [PATCH] Fix return of account_id from name2id(), add note about class constructor that does not load --- phpgwapi/inc/class.accounts_ldap_wip.inc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.accounts_ldap_wip.inc.php b/phpgwapi/inc/class.accounts_ldap_wip.inc.php index d1e1b04333..b122a45b6d 100644 --- a/phpgwapi/inc/class.accounts_ldap_wip.inc.php +++ b/phpgwapi/inc/class.accounts_ldap_wip.inc.php @@ -74,9 +74,12 @@ function accounts_() { + /* THIS DOES NOT LOAD */ + /* $this->db = $GLOBALS['phpgw']->db; $this->user_context = $GLOBALS['phpgw_info']['server']['ldap_context']; $this->group_context = $GLOBALS['phpgw_info']['server']['ldap_group_context']; + */ } function read_repository() @@ -423,15 +426,16 @@ if ($allValues[0]['uidnumber'][0]) { - $name_list[$account_lid] = intval($allValues[0]['uidnumber'][0]); + /* $name_list[$account_lid] = intval($allValues[0]['uidnumber'][0]); */ + return intval($allValues[0]['uidnumber'][0]); } - $sri = ldap_search($ds, $this->group_context, "cn=$account_id"); + $sri = ldap_search($ds, $this->group_context, "cn=$account_lid"); $allValues = ldap_get_entries($ds, $sri); if ($allValues[0]['gidnumber'][0]) { - $name_list[$account_lid] = False; + $name_list[$account_lid] = intval($allValues[0]['gidnumber'][0]); } return $name_list[$account_lid];