mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-31 02:21:28 +01:00
accounts::id2name() needs to return false, not throw an exception for not found accounts
This commit is contained in:
parent
0e0993863c
commit
92a97ea4d9
@ -590,12 +590,16 @@ class accounts
|
||||
*
|
||||
* @param int $account_id numerica account_id
|
||||
* @param string $which='account_lid' type to convert to: account_lid (default), account_email, ...
|
||||
* @return string/false converted value or false on error ($account_id not found)
|
||||
* @return string|boolean converted value or false on error ($account_id not found)
|
||||
*/
|
||||
static function id2name($account_id, $which='account_lid')
|
||||
{
|
||||
if (!($data = self::cache_read($account_id))) return false;
|
||||
|
||||
try {
|
||||
if (!($data = self::cache_read($account_id))) return false;
|
||||
}
|
||||
catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
//echo "<p>accounts::id2name($account_id,$which)='{$data[$which]}'";
|
||||
return $data[$which];
|
||||
}
|
||||
@ -997,6 +1001,7 @@ class accounts
|
||||
*
|
||||
* @param int $account_id
|
||||
* @return array
|
||||
* @throws egw_exception_wrong_parameter if no integer was passed as $account_id
|
||||
*/
|
||||
static function cache_read($account_id)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user