nikola Posted May 22, 2012 Share Posted May 22, 2012 How can I add forgot password functionality to front end (website) so that users can reset their password and so it can be sent to their mail? Link to comment Share on other sites More sharing options...
Soma Posted May 22, 2012 Share Posted May 22, 2012 Admin -> Modules -> Password Forgot module (install). Enjoy Link to comment Share on other sites More sharing options...
nikola Posted May 23, 2012 Author Share Posted May 23, 2012 Thanks Soma, I know about that... What I meant is that I would like to insert the code in my template that would call forget password screen directly on the front end (without going to Pw itself on the back end). User would have input field for entering his username on the front end with code that would reset password through PW api and sent him new password. Link to comment Share on other sites More sharing options...
Soma Posted May 23, 2012 Share Posted May 23, 2012 Ah, sorry for not getting it first time. Simple but not that easy that I could just write the code here. May I refer you to this? Link to comment Share on other sites More sharing options...
ryan Posted May 23, 2012 Share Posted May 23, 2012 Nikola, I haven't tried this yet, but this may provide what you need by putting this in your template: $controller = new ProcessController(); $controller->setProcessName('ProcessForgotPassword'); echo $controller->execute(); Since it'll be outputting markup, you will have to style it. But I think you already pretty familiar with this considering your beautiful admin themes. Link to comment Share on other sites More sharing options...
nikola Posted May 23, 2012 Author Share Posted May 23, 2012 Thanks Ryan, but it doesn't output anything when I put above code into the template... Styling is no problem Link to comment Share on other sites More sharing options...
Soma Posted May 23, 2012 Share Posted May 23, 2012 nikola, I think it's either because the Module isn't installed, or you're logged in while viewing the page. It only renders form when not logged in. I tested it but it doesn't seem to work just like this. Somehow it doesn't process it and instead just show the form again after submit. Link to comment Share on other sites More sharing options...
Soma Posted May 23, 2012 Share Posted May 23, 2012 Errm, while extensively testing things, I forgot that I had caching on, and once turned off (and urlsegments ) it seem to be working. Although not tested completely Link to comment Share on other sites More sharing options...
nikola Posted May 24, 2012 Author Share Posted May 24, 2012 Soma, thanks for testing. I was logged in so I didn't see the form. I've tested it out and it's working fine. Link to comment Share on other sites More sharing options...
Vayu Robins Posted June 3, 2015 Share Posted June 3, 2015 Hi, is it possible to use this ProcessForgotPassword module but where the username is the email? We will not be giving our users their username, but instead they must login with their email. Hence, the user must insert email to reset password. Link to comment Share on other sites More sharing options...
Macrura Posted June 5, 2015 Share Posted June 5, 2015 Nikola, I haven't tried this yet, but this may provide what you need by putting this in your template: $controller = new ProcessController(); $controller->setProcessName('ProcessForgotPassword'); echo $controller->execute();Since it'll be outputting markup, you will have to style it. But I think you already pretty familiar with this considering your beautiful admin themes. I'm using this technique, but noticed a couple of small issues: 1.) The email is sent in a format that forces the lines to break at a fixed character count (definitely on outlook for example) and this makes it so you can't click the URL in the message; and i can see it being probably hard to copy that if you were on a mobile or other touch screen. Not sure if there is really any way to fix this except to maybe send the message as HTML. 2.) Th confirmation screen once you have reset the password is not working, in other words i'm not getting to step 4 for some reason it redirects to the the same page and shows the form again, however the password reset is working. Otherwise this method seems to work really well. *note, I set this up as an issue on github 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