summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2013-01-21 20:57:45 (GMT)
committercatch2013-01-21 20:57:45 (GMT)
commit4e61e4c9c3ee8494d0feebe1ed1a6dbe7aa417f0 (patch)
treec28ddb02fad1e7c9206f318ea1aea20cf719c8b7
parent10ab47224d5fd8466f2b9e215dfebafae56abb1b (diff)
Issue #1804926 by rbayliss, ela.m, typhonius, edrupal: Convert register_pending_approval_admin() email to config system and provide the ability to configure it in UI.
-rw-r--r--core/modules/user/config/user.mail.yml3
-rw-r--r--core/modules/user/user.admin.inc21
-rw-r--r--core/modules/user/user.install2
3 files changed, 26 insertions, 0 deletions
diff --git a/core/modules/user/config/user.mail.yml b/core/modules/user/config/user.mail.yml
index edd78b9..7367e46 100644
--- a/core/modules/user/config/user.mail.yml
+++ b/core/modules/user/config/user.mail.yml
@@ -13,6 +13,9 @@ register_no_approval_required:
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)'
+register_pending_approval_admin:
+ body: "[user:name] has applied for an account.\n\n[user:edit-url]"
+ 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)'
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index 1b4d5b0..4da13b8 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -439,6 +439,27 @@ function user_admin_settings($form, &$form_state) {
'#rows' => 8,
);
+ $form['email_pending_approval_admin'] = array(
+ '#type' => 'details',
+ '#title' => t('Admin (user awaiting approval)'),
+ '#collapsible' => TRUE,
+ '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL),
+ '#description' => t('Edit the e-mail notifying the site administrator that there are new members awaiting administrative approval.') . ' ' . $email_token_help,
+ '#group' => 'email',
+ );
+ $form['email_pending_approval_admin']['register_pending_approval_admin_subject'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Subject'),
+ '#default_value' => $mail_config->get('register_pending_approval_admin.subject'),
+ '#maxlength' => 180,
+ );
+ $form['email_pending_approval_admin']['register_pending_approval_admin_body'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Body'),
+ '#default_value' => $mail_config->get('register_pending_approval_admin.body'),
+ '#rows' => 8,
+ );
+
$form['email_no_approval_required'] = array(
'#type' => 'details',
'#title' => t('Welcome (no approval required)'),
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index ff5a0e2..9a0b663 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -585,6 +585,8 @@ function user_update_8006() {
'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_pending_approval_admin_body' => 'register_pending_approval_admin.body',
+ 'register_pending_approval_admin_subject' => 'register_pending_approval_admin.subject',
'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',