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

route to reset-password being redirected to login #78

Closed
fefo-p opened this issue Aug 21, 2019 · 0 comments
Closed

route to reset-password being redirected to login #78

fefo-p opened this issue Aug 21, 2019 · 0 comments

Comments

@fefo-p
Copy link
Contributor

fefo-p commented Aug 21, 2019

Now that we (sort of) have Email working again in CI4, I tried using the forgot password feature.
All works fine until I click on the email link sent to the user.
Login filter tests the current_url() to see if it's a login page, but doesn't take into account the reset-password url. Therefore, it keeps on redirecting to login. Once logged in, it obviously redirects to reset-password form so you can enter the sent token. No point in this as you might definitely don't know your password.
Easy enough, adding a third 'OR' to the if will make it work fine.

if ( (current_url() == site_url(route_to('login'))) || (current_url() == site_url(route_to('forgot')))
|| (current_url() == site_url(route_to('reset-password')))
) { return; }

@fefo-p fefo-p changed the title route to reset-password being sent to login route to reset-password being redirected to login Aug 21, 2019
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

1 participant