Skip to content

Commit 37388c0

Browse files
committed
Tweak password reset.
1 parent 7343813 commit 37388c0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
1818

1919
<div class="col-md-6">
20-
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}">
20+
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" autofocus>
2121

2222
@if ($errors->has('email'))
2323
<span class="help-block">

src/Illuminate/Auth/Notifications/ResetPassword.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ public function via($notifiable)
3636
}
3737

3838
/**
39-
* Get the notification message.
39+
* Build the notification message.
4040
*
41-
* @param mixed $notifiable
42-
* @return \Illuminate\Notifications\MessageBuilder
41+
* @return $this
4342
*/
44-
public function message($notifiable)
43+
public function message()
4544
{
46-
return $this->line('You are receiving this email because we received a password reset request for your account. Click the button below to reset your password:')
47-
->action('Reset Password', url('password/reset', $this->token).'?email='.urlencode($notifiable->email))
48-
->line('If you did not request a password reset, no further action is required.');
45+
return $this->line([
46+
'You are receiving this email because we received a password reset request for your account.',
47+
'Click the button below to reset your password:'
48+
])
49+
->action('Reset Password', url('password/reset', $this->token))
50+
->line('If you did not request a password reset, no further action is required.');
4951
}
5052
}

0 commit comments

Comments
 (0)