From 8fff679c891f03452919ebc65f1136f72dd8c828 Mon Sep 17 00:00:00 2001 From: REJack Date: Thu, 22 Mar 2018 09:50:36 +0100 Subject: [PATCH] added check if perm exists in `is_allowed()` --- application/libraries/Aauth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 3a6c8159..69cc2803 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1692,7 +1692,9 @@ public function is_allowed($perm_par, $user_id=FALSE){ return true; } - $perm_id = $this->get_perm_id($perm_par); + if ( ! $perm_id = $this->get_perm_id($perm_par)) { + return FALSE; + } $query = $this->aauth_db->where('perm_id', $perm_id); $query = $this->aauth_db->where('user_id', $user_id);