Problem/Motivation
Upon form submission, ChangePasswordForm stays on the same page as before, showing a status message. It would be nice to check for Drupal ?destination= query param to redirect users if needed.
Also, the ChangePasswordForm class uses $_SESSION global arrays. It would be nice to change that to the Symfony session service to improve code quality.
Proposed resolution
Use the getRedirectDestination() method that is already present in the form base to redirect users to ?destination= path.
Import the SessionInterface service to the form and use it instead of $_SESSION.
| Comment | File | Size | Author |
|---|---|---|---|
| change_pwd_page-redirect-destination.patch | 2.45 KB | dlevchik |
Comments
Comment #2
dlevchik commented