Create a PasswordWasReset event. Then add a postReset function to the default passwordcontroller class, that will 'overwrite' the resetspassword trait: copy and paste the postReset function from the actual trait and fire the event in the part of the function that runs if reset was successful.
You could also put an if statement in a model event listener to determine if the password was updated, but that would be more of a general case, however emailing them about any password change is also a good practice.
Thank you Pal! :)
Last night I did change the vendor's original class. Fired the event from there just to get me going and finish the rest of the work. As soon as possible I will try to do as you advise and return the vendor's class to it's original code. I'll let you know if it worked as expected soon. Thanks again!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community