function email_confirm_update_7000 in Email Change Confirmation 7
Updates email confirmation text to use new token patterns.
File
- ./
email_confirm.install, line 11 - Install, update, & uninstall functions for Email Change Confirmation module.
Code
function email_confirm_update_7000() {
$map = array(
'!username' => '[user:name]',
'!site' => '[site:name]',
'!email_url' => '[email_confirm:email_url]',
);
$variables = array(
'email_confirm_confirmation_email_subject',
'email_confirm_confirmation_email_body',
'email_confirm_confirmation_original_email_body',
);
foreach ($variables as $variable) {
$var = variable_get($variable, '');
if (drupal_strlen($var)) {
$new_var = str_replace(array_keys($map), array_values($map), $var);
variable_set($variable, $new_var);
}
}
}