Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There needs to be a way to reset the user password. The user.module has the following regular HTTP route
user.pass.http:
path: '/user/password'
defaults:
_controller: \Drupal\user\Controller\UserAuthenticationController::resetPassword
methods: [POST]
requirements:
_access: 'TRUE'
_format: 'json'
Then the code is in \Drupal\user\Controller\UserAuthenticationController::resetPassword
Comment | File | Size | Author |
---|---|---|---|
#9 | 3106890-9.patch | 11.29 KB | mglaman |
#7 | 3106890-7.patch | 11.29 KB | mglaman |
#6 | 3106890-6.patch | 11.3 KB | mglaman |
#4 | 3106890-3.patch | 10.69 KB | mglaman |
Comments
Comment #2
mglamanComment #4
mglamanHere's a patch. Thanks to gabesullice for support and ideas on the response
Comment #5
mglaman??? this passed with flying colors locally on 8.8
Comment #6
mglamanHere's a new try, with better assert messaging.
Comment #7
mglamanTrying with cast to string due to stream problems. Maybe.
Comment #8
mglamanFrom some feedback by gabesullice, I think this makes sense to be `/user/password/reset`.
In the future we may need `PATCH /user/password` for changing the current password.
Comment #9
mglamanChange the path
Comment #11
mglaman🎊committed!