Problem/Motivation
There are already two public (functional) methods for generating a URL that performs an action on a user in user.module:
- \user_pass_reset_url()
- \user_cancel_url()
#85494: Use email verification when changing user email addresses at the time of writing threatens to introduce another one, as noted by @alexpott (part 5) and by @larowlan.
Proliferation of public APIs should be avoided, and the user module needs some OO love.
Steps to reproduce
Not applicable.
Proposed resolution
Create an injectable service which can fill the needs of these existing and new methods and refine it to fulfil any related tasks which might appear in future, or leave room for that to occur.
Remaining tasks
- Write the service
- Create relevant tests
- Write change record to deprecate \user_pass_reset_url() and \user_cancel_url()
- Review
User interface changes
None
API changes
- Create new service to respond to all user action URL generation and check requests
- Deprecate
\user_cancel_urland\user_pass_rehashas a follow-up task.
Data model changes
None
Release notes snippet
TBC