Skip to content

Commit

Permalink
fix: add missing placeholder value to Auth.invalidEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 11, 2024
1 parent 1034d55 commit fbb74be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Authentication/Actions/Email2FA.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function handle(IncomingRequest $request)
}

if (empty($email) || $email !== $user->email) {
return redirect()->route('auth-action-show')->with('error', lang('Auth.invalidEmail'));
return redirect()->route('auth-action-show')->with('error', lang('Auth.invalidEmail', [$email]));
}

$identity = $this->getIdentity($user);
Expand Down
2 changes: 1 addition & 1 deletion tests/Controllers/ActionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testEmail2FAHandleInvalidEmail(): void

$result->assertRedirect();
$this->assertSame(site_url('/auth/a/show'), $result->getRedirectUrl());
$result->assertSessionHas('error', lang('Auth.invalidEmail'));
$result->assertSessionHas('error', lang('Auth.invalidEmail', ['[email protected]']));
}

private function insertIdentityEmal2FA(): void
Expand Down

0 comments on commit fbb74be

Please sign in to comment.