Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] What is the purpose of "resetNotifier" in "SendsPasswordResetEmails" trait #15445

Closed
ElfSundae opened this issue Sep 15, 2016 · 1 comment

Comments

@ElfSundae
Copy link
Contributor

  • Laravel Version: 5.3.9

There is a method resetNotifier in the SendsPasswordResetEmails trait, but it is not called at all. Maybe we should remove it, or add a parameter in PasswordBroker::sendResetLink just like PasswordBroker::reset does.

From the PHPDoc, I guess this method would be used to return a notification like this:

/**
 * Get the Closure which is used to build the password reset notification.
 *
 * @return \Closure
 */
protected function resetNotifier()
{
    return function ($token) {
        return new ResetPasswordNotification($token);
    };
}

Am I right? Then what notification instance will be used if the notifiable object implemented CanResetPassword trait?

@themsaid
Copy link
Member

You're right, this method is not used and should be deleted. Removed in #15446

To use a custom Notification you need to overwrite the sendPasswordResetNotification in your User model, this method is coming from the Illuminate\Auth\Passwords\CanResetPassword trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants