From 92d861e7127a96d228ca2ff463fb80d7d8423b4a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 24 Jun 2011 10:28:08 +0000 Subject: [PATCH] give #account_id, if user not found --- phpgwapi/inc/class.common.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index ff089562b4..1860432065 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -398,11 +398,14 @@ class common * grab the owner name * * @param $id account id + * @return string full name of user or "#$accountid" if user not found */ static function grab_owner_name($accountid = '') { - $GLOBALS['egw']->accounts->get_account_name($accountid,$lid,$fname,$lname); - + if (!$GLOBALS['egw']->accounts->get_account_name($accountid,$lid,$fname,$lname)) + { + return '#'.$accountid; + } return self::display_fullname($lid,$fname,$lname,$accountid); }