Problem/Motivation

When trying to save the account settings page, you receive the error “token is a required key.” This happens because rest_password.install doesn’t set the token.

$new = [
      'body' => '[user:display-name],
        A request to reset the password for your account has been made at [site:name].
        Here is your temporary password [user:rest-temp-password] this will expire in 7 Days.
        [user:name-url-encode]
        [user:name-url-encode-spaces]',
      'subject' => 'Replacement login information for [user:display-name]',
    ];

Since token was added to the schema in rest_password_config_schema_info_alter, Drupal core validates the key. By default, a key must be set unless you explicitly define 'requiredKey' => FALSE.

The quickest solution is simply to set the value.

Steps to reproduce

- Go to /admin/config/people/accounts
- Try to save the form

Proposed resolution

Set token in .install

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 3560119-3.patch454 bytesthenchev

Comments

thenchev created an issue. See original summary.

thenchev’s picture

Issue summary: View changes
thenchev’s picture

StatusFileSize
new454 bytes
thenchev’s picture

Status: Active » Needs review