- $admin_email = $this->config->get('config', 'admin_email');
-
- $adminlist = explode(',', str_replace(' ', '', $admin_email));
-
- return local_user() && $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()
+ ]);