Skip to content

Commit

Permalink
Revert PR #38552 (#38711)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Sep 8, 2021
1 parent 9e84430 commit 408dc67
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/Illuminate/Auth/Notifications/ResetPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,20 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
$url = $this->resetUrl($notifiable);

if (static::$toMailCallback) {
return call_user_func(static::$toMailCallback, $notifiable, $this->token, $url);
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}

return $this->buildMailMessage($url);
}

/**
* Get the password reset URL for the given notifiable.
*
* @param mixed $notifiable
* @return string
*/
protected function resetUrl($notifiable)
{
if (static::$createUrlCallback) {
return call_user_func(static::$createUrlCallback, $notifiable, $this->token);
$url = call_user_func(static::$createUrlCallback, $notifiable, $this->token);
} else {
return url(route('password.reset', [
$url = url(route('password.reset', [
'token' => $this->token,
'email' => $notifiable->getEmailForPasswordReset(),
], false));
}

return $this->buildMailMessage($url);
}

/**
Expand Down

0 comments on commit 408dc67

Please sign in to comment.