Skip to content

Commit 76e8e7f

Browse files
Merge pull request #469 from sobolevna/master
Update Authentication.php
2 parents f5cfac8 + 2128d96 commit 76e8e7f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Services/Authentication.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ private function executeAuthMethod($method)
3636
foreach ($this->getAuthentication() as $auth) {
3737
foreach ($guards as $guard) {
3838
// Call guard() if not null
39-
if ($guards != 'null') {
39+
if ($guard && $guard != 'null') {
4040
$auth = $auth->guard($guard);
41-
}
42-
43-
if (is_callable([$auth, $method], true, $callable_name)) {
44-
if ($data = $auth->$method()) {
45-
return $data;
46-
}
41+
}
42+
}
43+
if (is_callable([$auth, $method], true, $callable_name)) {
44+
if ($data = $auth->$method()) {
45+
return $data;
4746
}
4847
}
4948
}

0 commit comments

Comments
 (0)