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
Comments
Comment #2
thenchev commentedComment #3
thenchev commentedComment #4
thenchev commented