mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Added error checking for name2id() and id2name(), return False when the account_id or account_lid is missing
This commit is contained in:
parent
f25585896f
commit
ae36eeb708
@ -156,6 +156,11 @@
|
|||||||
{
|
{
|
||||||
static $name_list;
|
static $name_list;
|
||||||
|
|
||||||
|
if (! $account_lid)
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if($name_list[$account_lid] && $name_list[$account_lid] != '')
|
if($name_list[$account_lid] && $name_list[$account_lid] != '')
|
||||||
{
|
{
|
||||||
return $name_list[$account_lid];
|
return $name_list[$account_lid];
|
||||||
@ -178,6 +183,11 @@
|
|||||||
{
|
{
|
||||||
static $id_list;
|
static $id_list;
|
||||||
|
|
||||||
|
if (! $account_id)
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if($id_list[$account_id])
|
if($id_list[$account_id])
|
||||||
{
|
{
|
||||||
return $id_list[$account_id];
|
return $id_list[$account_id];
|
||||||
|
Loading…
Reference in New Issue
Block a user