fix PHP 8.0 TypeError: EGroupware\Api\Accounts::username(): Argument #1 ($account_id) must be of type ?int, string given

This commit is contained in:
Ralf Becker 2021-11-16 20:53:20 +01:00
parent 382c39e817
commit be7fbf35fa

View File

@ -1257,7 +1257,7 @@ abstract class admin_cmd
*/ */
static function display_account($account) static function display_account($account)
{ {
$id = is_numeric($account) ? $account : $GLOBALS['egw']->accounts->id2name($account); $id = is_numeric($account) ? $account : Api\Accounts::getInstance()->name2id($account);
return $account.' ('.Api\Accounts::username($id).')'; return $account.' ('.Api\Accounts::username($id).')';
} }