Browse Source

moved $userModel in isAdmin

v3-dev
REJack 6 years ago
parent
commit
ed4b0125d5
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 4
      app/Libraries/Aauth.php

4
app/Libraries/Aauth.php

@ -540,13 +540,13 @@ class Aauth
*/ */
public function isAdmin(int $userId = null) public function isAdmin(int $userId = null)
{ {
$userModel = new UserModel();
if (! $userId) if (! $userId)
{ {
$userId = (int) @$this->session->user['id']; $userId = (int) @$this->session->user['id'];
} }
$userModel = new UserModel();
return $this->isMember($this->config->groupAdmin, $userId); return $this->isMember($this->config->groupAdmin, $userId);
} }

Loading…
Cancel
Save