mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Small changes. Added the caching back into id2name and did a little more checking for use of caching.
This commit is contained in:
parent
4fdb437dc2
commit
81dfa789c0
@ -415,7 +415,7 @@
|
||||
{
|
||||
static $name_list;
|
||||
|
||||
if(@isset($name_list[$account_lid]))
|
||||
if(@isset($name_list[$account_lid]) && $name_list[$account_lid])
|
||||
{
|
||||
return $name_list[$account_lid];
|
||||
}
|
||||
@ -425,18 +425,18 @@
|
||||
$sri = ldap_search($ds, $this->group_context, "(&(cn=$account_lid)(phpgwaccounttype=g))");
|
||||
$allValues = ldap_get_entries($ds, $sri);
|
||||
|
||||
if ($allValues[0]['gidnumber'][0])
|
||||
if (@$allValues[0]['gidnumber'][0])
|
||||
{
|
||||
$name_list[$account_lid] = intval($allValues[0]['gidnumber'][0]);
|
||||
}
|
||||
|
||||
$sri = ldap_search($ds, $this->user_context, "(&(uid=$account_lid)(phpgwaccounttype=u))");
|
||||
|
||||
$allValues = ldap_get_entries($ds, $sri);
|
||||
|
||||
if ($allValues[0]['uidnumber'][0])
|
||||
if (@$allValues[0]['uidnumber'][0])
|
||||
{
|
||||
/* $name_list[$account_lid] = intval($allValues[0]['uidnumber'][0]); */
|
||||
return intval($allValues[0]['uidnumber'][0]);
|
||||
$name_list[$account_lid] = intval($allValues[0]['uidnumber'][0]);
|
||||
}
|
||||
|
||||
return $name_list[$account_lid];
|
||||
|
Loading…
Reference in New Issue
Block a user