diff options
| author | Frédéric Guillot <fred@kanboard.net> | 2015-01-02 17:19:13 -0500 |
|---|---|---|
| committer | Frédéric Guillot <fred@kanboard.net> | 2015-01-02 17:19:13 -0500 |
| commit | 3076ba22dd8346725b4e1ad757532c00df5b18d9 (patch) | |
| tree | e893c113c34d86c5dc923953754dc68c4b1d842d /app/Model/User.php | |
| parent | c32567857db9bb1a6dfa339f58d817c97f64db11 (diff) | |
Fix bugs, improve perfs and use SimpleLogger instead of Monolog
Diffstat (limited to 'app/Model/User.php')
| -rw-r--r-- | app/Model/User.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Model/User.php b/app/Model/User.php index 78d44b47..29def6d4 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -48,7 +48,8 @@ class User extends Base */ public function isAdmin($user_id) { - return $this->db + return $this->userSession->isAdmin() || // Avoid SQL query if connected + $this->db ->table(User::TABLE) ->eq('id', $user_id) ->eq('is_admin', 1) |
