From f42e5468ffc5037ac10c20256509e690064d6c83 Mon Sep 17 00:00:00 2001 From: REJack Date: Tue, 27 Oct 2015 12:14:37 +0100 Subject: [PATCH] moved $perm_id after the if's conditions for more performance --- application/libraries/Aauth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 3663b67..972afd7 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1463,8 +1463,6 @@ class Aauth { */ public function is_allowed($perm_par, $user_id=FALSE){ - $perm_id = $this->get_perm_id($perm_par); - if( $user_id == FALSE){ $user_id = $this->CI->session->userdata('id'); } @@ -1473,6 +1471,8 @@ class Aauth { { return true; } + + $perm_id = $this->get_perm_id($perm_par); $query = $this->aauth_db->where('perm_id', $perm_id); $query = $this->aauth_db->where('user_id', $user_id);