When configuring a login destination rule for the trigger "One-time login link" and the setting "Redirect immediately after using one-time login link" is not enabled, the redirect should not happen immediately after login, but after the user submits the user account form (so the user has a chance to change his/her password).
If the setting "Redirect immediately after using one-time login link" is enabled, the user should still be redirected immediately.
Patch with tests will follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-3006755-2-5.txt | 8.19 KB | megachriz |
| #5 | login_destination-password-reset-redirect-3006755-5.patch | 16.8 KB | megachriz |
Comments
Comment #2
megachrizThis patch should fix the issue and provides a test.
Also tests for triggers "Registration", "Login" and "Logout"
Besides a test for the trigger "One-time login link", tests for the other three triggers are also added in this patch. Usually it is a best practice to keep an issue focussed and not add other things to it. But I figured if I would provide these changes separately, then if one gets committed, the other one needs to be rerolled. So I guess that in this case it would be more productive to provide the changes combined. If requested or if one of the other tests would fail, I could still provide the changes separately.
Comment #3
megachriz(Setting organization attribution)
Comment #5
megachrizWhile testing, I found one bug with my patch in #2: when the "Immediate redirect" setting was not enabled, the trigger for "login" was executed when using a one-time login link.
The attached patch fixes that issue and adds tests that each trigger is not activated when not configured. For example: no redirect should happen on logout when only a destination rule exist for login.
I also added a test that ensures that a destination rule configured for the one-time login trigger does not activate when someone already logged in is updating their account.
Comment #6
miroslav-leeI tested this patch. It works for me
Comment #8
rsvelko commentedThanks, @MegaChriz!
Tested it, committed, all good here.
Comment #9
megachriz@rsvelko
Thanks for testing and committing!
Comment #10
rsvelko commented