Skip to content

Commit

Permalink
[1.x] Use available $name property from SessionGuard if the value
Browse files Browse the repository at this point in the history
exists

Introduced in Laravel Framwork 10.0.0: laravel/framework#43163

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Jun 27, 2024
1 parent 04078fb commit 46e959c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Actions/AttemptToAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function throwFailedAuthenticationException($request)
*/
protected function fireFailedEvent($request)
{
event(new Failed(config('fortify.guard'), null, [
event(new Failed($this->guard?->name ?? config('fortify.guard'), null, [
Fortify::username() => $request->{Fortify::username()},
'password' => $request->password,
]));
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/RedirectIfTwoFactorAuthenticatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function throwFailedAuthenticationException($request)
*/
protected function fireFailedEvent($request, $user = null)
{
event(new Failed(config('fortify.guard'), $user, [
event(new Failed($this->guard?->name ?? config('fortify.guard'), $user, [
Fortify::username() => $request->{Fortify::username()},
'password' => $request->password,
]));
Expand Down

0 comments on commit 46e959c

Please sign in to comment.