Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 314227

Consolidate public APIs for generating user action URLs into a service

$
0
0

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_url and \user_pass_rehash as a follow-up task.

Data model changes

None

Release notes snippet

TBC


Viewing all articles
Browse latest Browse all 314227

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>