Problem/Motivation
If the website send the link "[user:one-time-login-url]/login" in the reset pass email configuration, this is not the route "user.reset" but the route "user.reset.login" that is used.
In this particular case, the module "shy on time" does not work.
Proposed resolution
Change the following condition in the event subsriber:
if ($request->attributes->get('_route') === 'user.reset')
With:
if ($request->attributes->get('_route') === 'user.reset' || $request->attributes->get('_route') === 'user.reset.login' )
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | add-user-reset-login-route-3487126-6.patch | 800 bytes | merilainen |
Issue fork shy_one_time-3487126
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
davidpetit commentedI commited and pushed the fix in the issue fork + merge request.
Comment #4
dennisdkConfirmed working as expected!
Also needed for our use-case where email clients will use this login link, making it expire.
Comment #5
idebr commentedComment #7
merilainen commentedHere is an improved patch which doesn't call the get() multiple times. Same logic applies so I will leave it at RTBC.
Updated also the MR.
Comment #9
zcht commentedThank you very much for the logical finding, it is committed.
Comment #10
zcht commented