Update Verifier class to use tokens

Created on 27 May 2025, 11 days ago

Problem/Motivation

The Verifier service currently appends the URL below the message template. It should use the Drupal token system to insert the URL token into the message, and allow other tokens to be used.

Steps to reproduce

See parent issue.

Proposed resolution

Update the Verifier service. Remove the appended URL, and pass through the token system.

Remaining tasks

  1. In the Verifier service, add a property to the constructor with a type of \Drupal\Core\Utility\Token.
  2. In the sendVerficiationEmail function, create a data array. This should contain a key of verify_email to a child array containing a key of url to the generated URL.
  3. Remove the concatenation of newlines and the URL from the message body.
  4. Pass the subject and body through the token service's replace function, passing in the data array.
  5. Update the services.yml file to add the @token service to the Verifier.

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024