fix: lowercase email in forgot password
This commit is contained in:
parent
23b7fc3c54
commit
b22fecb615
@ -15,7 +15,7 @@
|
||||
@if (is_transactional_emails_active())
|
||||
<form action="/forgot-password" method="POST" class="flex flex-col gap-2">
|
||||
@csrf
|
||||
<x-forms.input required value="test@example.com" type="email" name="email"
|
||||
<x-forms.input required type="email" name="email"
|
||||
label="{{ __('input.email') }}" autofocus />
|
||||
<x-forms.button type="submit">{{ __('auth.forgot_password_send_email') }}</x-forms.button>
|
||||
</form>
|
||||
|
@ -30,6 +30,10 @@
|
||||
|
||||
Route::post('/forgot-password', function (Request $request) {
|
||||
if (is_transactional_emails_active()) {
|
||||
$arrayOfRequest = $request->only(Fortify::email());
|
||||
$request->merge([
|
||||
'email' => Str::lower($arrayOfRequest['email']),
|
||||
]);
|
||||
$type = set_transanctional_email_settings();
|
||||
if (!$type) {
|
||||
return response()->json(['message' => 'Transactional emails are not active'], 400);
|
||||
|
Loading…
Reference in New Issue
Block a user