Skip to content

Commit 8fff679

Browse files
committed
added check if perm exists in is_allowed()
1 parent 9becdd3 commit 8fff679

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

application/libraries/Aauth.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,9 @@ public function is_allowed($perm_par, $user_id=FALSE){
16921692
return true;
16931693
}
16941694

1695-
$perm_id = $this->get_perm_id($perm_par);
1695+
if ( ! $perm_id = $this->get_perm_id($perm_par)) {
1696+
return FALSE;
1697+
}
16961698

16971699
$query = $this->aauth_db->where('perm_id', $perm_id);
16981700
$query = $this->aauth_db->where('user_id', $user_id);

0 commit comments

Comments
 (0)