Skip to content

Commit

Permalink
added check if perm exists in is_allowed()
Browse files Browse the repository at this point in the history
  • Loading branch information
REJack committed Mar 22, 2018
1 parent 9becdd3 commit 8fff679
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8fff679

Please sign in to comment.