Fix bugs, improve perfs and use SimpleLogger instead of Monolog

This commit is contained in:
Frédéric Guillot
2015-01-02 17:19:13 -05:00
parent c32567857d
commit 3076ba22dd
39 changed files with 288 additions and 139 deletions

View File

@@ -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)