From 19d49657625ab61e6f4775596bfff7a62e5d37ce Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 2 May 2016 20:24:16 +0000 Subject: [PATCH] no need to instanciate object for static methods --- api/src/Preferences.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/Preferences.php b/api/src/Preferences.php index 35858f767b..b04c117ce9 100644 --- a/api/src/Preferences.php +++ b/api/src/Preferences.php @@ -951,12 +951,12 @@ class Preferences return $this->data['email']['address']; } // if email-address is set in the account, return it - if (($email = $GLOBALS['egw']->accounts->id2name($account_id,'account_email'))) + if (($email = Accounts::id2name($account_id,'account_email'))) { return $email; } - $prefs_email_address = $GLOBALS['egw']->accounts->id2name($account_id); - if (strpos($prefs_email_address,'@') === False) + $prefs_email_address = Accounts::id2name($account_id); + if ($prefs_email_address && strpos($prefs_email_address,'@') === False) { $prefs_email_address .= '@' . $GLOBALS['egw_info']['server']['mail_suffix']; }