diff --git a/fuel/modules/fuel/libraries/Fuel_auth.php b/fuel/modules/fuel/libraries/Fuel_auth.php index 7b556ca39..88354823b 100644 --- a/fuel/modules/fuel/libraries/Fuel_auth.php +++ b/fuel/modules/fuel/libraries/Fuel_auth.php @@ -338,9 +338,16 @@ public function has_permission($permission, $type = '') if (is_array($permission)) { $foreign_module = NULL; - if ((isset($permission[0]) AND $permission[0] != $this->CI->module) AND in_array($permission[0], array_keys($this->CI->fuel->modules->get()))) { - $foreign_module = $permission[0]; + + if (isset($permission[0]) AND in_array($permission[0], array_keys($this->CI->fuel->modules->get()))) + { + // broken out to simplify + if (!isset($this->CI->module) OR (isset($this->CI->module) AND $permission[0] != $this->CI->module)) + { + $foreign_module = $permission[0]; + } } + foreach($permission as $key => $val) { if (is_int($key) && !empty($this->CI->module))