function user_update_8100
Fix invalid token in the status_blocked email body.
File
-
core/
modules/ user/ user.install, line 97
Code
function user_update_8100() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('user.mail');
$mail = $config->get('status_blocked');
if (strpos($mail['body'], '[site:account-name]') !== FALSE) {
$mail['body'] = str_replace('[site:account-name]', '[site:name]', $mail['body']);
$config->set('status_blocked', $mail)
->save(TRUE);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.