diff --git a/src/Services/Authentication.php b/src/Services/Authentication.php index 37695a32..4fe043bf 100644 --- a/src/Services/Authentication.php +++ b/src/Services/Authentication.php @@ -36,14 +36,13 @@ private function executeAuthMethod($method) foreach ($this->getAuthentication() as $auth) { foreach ($guards as $guard) { // Call guard() if not null - if ($guards != 'null') { + if ($guard && $guard != 'null') { $auth = $auth->guard($guard); - } - - if (is_callable([$auth, $method], true, $callable_name)) { - if ($data = $auth->$method()) { - return $data; - } + } + } + if (is_callable([$auth, $method], true, $callable_name)) { + if ($data = $auth->$method()) { + return $data; } } }