suntrop Posted June 6, 2018 Share Posted June 6, 2018 I am using the Login/Register module and have enabled the forgot password feature and the ProcessForgotPassword module is installed as well. When I enter an email to reset the password, no email is sent. I noticed there is a 'process_forgot_password' table in the DB … with no rows. Other emails are working well, just the forgot email is not working. Link to comment Share on other sites More sharing options...
flydev Posted June 6, 2018 Share Posted June 6, 2018 12 minutes ago, suntrop said: When I enter an email to reset the password Hi @suntrop by default you have to enter an username, not an email , and this user/email should exist in the system ? Link to comment Share on other sites More sharing options...
suntrop Posted June 6, 2018 Author Share Posted June 6, 2018 I am currently looking at the module's code and realised the same. I configured the Login/Register module to use an email rather than a username to login. It seems this function is not compatible to the forgot password module. Is it possible to copy the module from wire/modules to site/modules and edit the module's code? I would add a reset by email before coding a new, own reset function,. Link to comment Share on other sites More sharing options...
flydev Posted June 6, 2018 Share Posted June 6, 2018 It work, just test it. Quote /** * Process the form submitted from step1 with username or email * * If it matches up to an account in the system, then send them an email. * */ The only thing which could confuse the user, its the phrase, maybe its possible to hook into the ForgotPassword module to change that. Otherwise everything is fine. 1 Link to comment Share on other sites More sharing options...
suntrop Posted June 6, 2018 Author Share Posted June 6, 2018 At the moment I just hacked inside the module directly to change from user name to useremail. There is useremail input field (in PHP comments) what I am using. Works fine, email was sent. However, I need to move this module to my sites directory, so it won't be overwritten the next update. Perhaps I can code something and PR to Ryan to update the module Link to comment Share on other sites More sharing options...
flydev Posted June 6, 2018 Share Posted June 6, 2018 32 minutes ago, suntrop said: However, I need to move this module to my sites directory, so it won't be overwritten the next update. Perhaps I can code something and PR to Ryan to update the module I don't know which version you are using, but it already work out of the box... you do not need to hack something to get it working. It already check if the post var from step 1 is an email, if not, it check against username. https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessForgotPassword.module#L234 In ProcessForgotPassword 1.0.3, you can configure it : 2 Link to comment Share on other sites More sharing options...
suntrop Posted June 7, 2018 Author Share Posted June 7, 2018 Oh cool, this look quite different to what I had before ? I am using 3.0.98. I just copied the module and seems to work fine. Thanks for that! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now