X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=623a5b63a20a29b463bf78231394a503c07139bb;hb=edc6851f0ee016b3140d81a4dcac2a50240ee959;hp=27eaf100f490e7908abcea41d6e96695320cd060;hpb=a7e9457ef2417b74aadfe3640f1ed2e2b332c1fd;p=friendica.git diff --git a/src/App.php b/src/App.php index 27eaf100f4..623a5b63a2 100644 --- a/src/App.php +++ b/src/App.php @@ -27,6 +27,7 @@ use Friendica\App\BaseURL; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Factory\Config; use Friendica\Core\Session\Capability\IHandleUserSessions; +use Friendica\Model\User; use Friendica\Module\Maintenance; use Friendica\Security\Authentication; use Friendica\Core\Config\ValueObject\Cache; @@ -68,7 +69,6 @@ class App private $theme_info = [ 'videowidth' => 425, 'videoheight' => 350, - 'events_in_profile' => true ]; private $user_id = 0; @@ -164,14 +164,16 @@ class App * Check if current user has admin role. * * @return bool true if user is an admin + * @throws Exception */ public function isSiteAdmin(): bool { - $admin_email = $this->config->get('config', 'admin_email'); - - $adminlist = explode(',', str_replace(' ', '', $admin_email)); - - return $this->session->getLocalUserId() && $admin_email && $this->database->exists('user', ['uid' => $this->getLoggedInUserId(), 'email' => $adminlist]); + return + $this->session->getLocalUserId() + && $this->database->exists('user', [ + 'uid' => $this->getLoggedInUserId(), + 'email' => User::getAdminEmailList() + ]); } /** @@ -259,8 +261,8 @@ class App /** * Set workerqueue information * - * @param array $queue - * @return void + * @param array $queue + * @return void */ public function setQueue(array $queue) {