diff -u b/core/modules/user/config/user.mail.yml b/core/modules/user/config/user.mail.yml --- b/core/modules/user/config/user.mail.yml +++ b/core/modules/user/config/user.mail.yml @@ -2,24 +2,23 @@ - body: "[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team" - subject: 'Account cancellation request for [user:name] at [site:name]' + body: "[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team" + subject: 'Account cancellation request for [user:name] at [site:name]' password_reset: - body: "[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team" - subject: 'Replacement login information for [user:name] at [site:name]' + body: "[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team" + subject: 'Replacement login information for [user:name] at [site:name]' register_admin_created: - body: "[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" - subject: 'An administrator created an account for you at [site:name]' + body: "[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" + subject: 'An administrator created an account for you at [site:name]' register_no_approval_required: - body: "[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" - subject: 'Account details for [user:name] at [site:name]' + body: "[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" + subject: 'Account details for [user:name] at [site:name]' register_pending_approval: - body: "[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team" - subject: 'Account details for [user:name] at [site:name] (pending admin approval)' + body: "[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team" + subject: 'Account details for [user:name] at [site:name] (pending admin approval)' status_activated: - body: "[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" - subject: 'Account details for [user:name] at [site:name] (approved)' + body: "[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team" + subject: 'Account details for [user:name] at [site:name] (approved)' status_blocked: - body: "[user:name],\n\nYour account on [site:name] has been blocked.\n\n-- [site:name] team" - subject: 'Account details for [user:name] at [site:name] (blocked)' + body: "[user:name],\n\nYour account on [site:name] has been blocked.\n\n-- [site:name] team" + subject: 'Account details for [user:name] at [site:name] (blocked)' status_canceled: - body: "[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team" - subject: 'Account details for [user:name] at [site:name] (canceled)' - + body: "[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team" + subject: 'Account details for [user:name] at [site:name] (canceled)' interdiff impossible; taking evasive action reverted: --- b/core/modules/user/user.install +++ a/core/modules/user/user.install @@ -506,41 +506,5 @@ } /** - * Moves user mail settings from variable to config. - * - * @ingroup config_upgrade - */ -function user_update_8005() { - $config = config('user.mail'); - $conversion_variable_to_key = array( - 'register_admin_created_subject' => 'register_admin_created.subject', - 'register_admin_created_body' => 'register_admin_created.body', - 'register_pending_approval_subject' => 'register_pending_approval.subject', - 'register_pending_approval_body' => 'register_pending_approval.body', - 'register_no_approval_required_subject' => 'register_no_approval_required.subject', - 'register_no_approval_required_body' => 'register_no_approval_required.body', - 'password_reset_subject' => 'password_reset.subject', - 'password_reset_body' => 'password_reset.body', - 'status_activated_subject' => 'status_activated.subject', - 'status_activated_body' => 'status_activated.body', - 'status_blocked_subject' => 'status_blocked.subject', - 'status_blocked_body' => 'status_blocked.body', - 'cancel_confirm_subject' => 'cancel_confirm.subject', - 'cancel_confirm_body' => 'cancel_confirm.body', - 'status_canceled_subject' => 'status_canceled.subject', - 'status_canceled_body' => 'status_canceled.body', - ); - - foreach ($conversion_variable_to_key as $variable_name => $config_key) { - // Potentially the only place the current user mail text is defined is as - // a hardcoded value. Call update_user_mail_text() to get the value. - $config->set($config_key, update_user_mail_text($variable_name)); - // If the variable exists delete it. This will fail silently. - update_variable_del($variable_name); - } - $config->save(); -} - -/** * @} End of "addtogroup updates-7.x-to-8.x". */ unchanged: --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -525,6 +525,42 @@ function user_update_8005() { ); db_add_field('users', 'preferred_admin_langcode', $spec); } + +/** + * Moves user mail settings from variable to config. + * + * @ingroup config_upgrade + */ +function user_update_8006() { + $config = config('user.mail'); + $conversion_variable_to_key = array( + 'register_admin_created_subject' => 'register_admin_created.subject', + 'register_admin_created_body' => 'register_admin_created.body', + 'register_pending_approval_subject' => 'register_pending_approval.subject', + 'register_pending_approval_body' => 'register_pending_approval.body', + 'register_no_approval_required_subject' => 'register_no_approval_required.subject', + 'register_no_approval_required_body' => 'register_no_approval_required.body', + 'password_reset_subject' => 'password_reset.subject', + 'password_reset_body' => 'password_reset.body', + 'status_activated_subject' => 'status_activated.subject', + 'status_activated_body' => 'status_activated.body', + 'status_blocked_subject' => 'status_blocked.subject', + 'status_blocked_body' => 'status_blocked.body', + 'cancel_confirm_subject' => 'cancel_confirm.subject', + 'cancel_confirm_body' => 'cancel_confirm.body', + 'status_canceled_subject' => 'status_canceled.subject', + 'status_canceled_body' => 'status_canceled.body', + ); + + foreach ($conversion_variable_to_key as $variable_name => $config_key) { + // Potentially the only place the current user mail text is defined is as + // a hardcoded value. Call update_user_mail_text() to get the value. + $config->set($config_key, update_user_mail_text($variable_name)); + // If the variable exists delete it. This will fail silently. + update_variable_del($variable_name); + } + $config->save(); +} /** * @} End of "addtogroup updates-7.x-to-8.x". */