Jump to content

Forgot password on front end


nikola
 Share

Recommended Posts

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

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

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

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

  • 3 years later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...