Hello
My Drupal site has the following user settings enabled:
- Visitors can create accounts but administrator approval is required.
- Require e-mail verification when a visitor creates an account
Now, I wanted to edit the mail that is sent to the admins when a user requests an account.
Am I overlooking something or is this not possible in the default Drupal UI?
The "_user_mail_text" function in user.module told me that I had to look for a variable "user_mail_register_pending_approval_admin_subject" and "user_mail_register_pending_approval_admin_body" but unlike the other e-mail variables, these variables do not have a form available to change them?
I know it's not that hard to create a custom form to edit the variables but I wanted to make sure this functionality is not hidden somewhere else :)
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#15 | admin_user_register_notify-809806-15.patch | 1.44 KB | adammalone |
#6 | 809806-Register pending approval admin mails not configurable.patch | 2.48 KB | jonne.freebase |
Comments
Comment #1
dddave CreditAttribution: dddave commentedPerhaps I am misunderstanding you but you can edit the mails at admin/user/settings. Maybe you missed it because the elements are collapsed?
Comment #2
jvandooren CreditAttribution: jvandooren commentedYes I know, but the e-mail that I want to edit is not configurable there...
It's the email that is sent to the admin when a user creates an account that is pending...
If I search my whole drupal project for "register_pending_approval_subject" for example, I can see where the form is created to change the e-mail.
But I can't find a form that sets "register_pending_approval_admin_subject" (or body).
Comment #3
dddave CreditAttribution: dddave commentedSorry, I misread your issue. That is really a headscratcher...
Comment #4
zeta1600 CreditAttribution: zeta1600 commentedSame here... Did you figure this out? I certainly don't want to edit the core /modules/user/user.module. I wish I knew how to create a module.
Comment #5
jonne.freebase CreditAttribution: jonne.freebase commentedAs far as I can tell this is still an issue in D7.
Comment #6
jonne.freebase CreditAttribution: jonne.freebase commentedThis is a patch that seems to work for me for the limited testing I've done.
Comment #7
jonne.freebase CreditAttribution: jonne.freebase commentedComment #9
jonne.freebase CreditAttribution: jonne.freebase commented#6: 809806-Register pending approval admin mails not configurable.patch queued for re-testing.
Comment #11
edrupal CreditAttribution: edrupal commentedIt looks like this functionality is also being addressed by patch register_pending_approval_admin-1804926-7.patch in issue Convert register_pending_approval_admin to config/state system.
No idea which is the better approach.
Comment #12
jonne.freebase CreditAttribution: jonne.freebase commentedIt appears the other patch is for drupal 8 only (it patches a file called user/config/user.mail.yml , which is not in Drupal 7, AFAICT). So if you use drupal 7, use the patch in this thread.
Comment #13
jonne.freebase CreditAttribution: jonne.freebase commented#6: 809806-Register pending approval admin mails not configurable.patch queued for re-testing.
trying this again, for some reason the testing script can't download the patch, even though it's right here on drupal.org .
Comment #15
adammaloneLet's try this Drupal 7 patch...
The patch in #6 had some extra stuff from variable module (contrib hence not applicable for a core patch) in so likely won't apply to most Drupal installs.
Comment #16
adammaloneComment #17
alexpottThis is a feature and should be done in Drupal 8 first and then backported. There already is an issue for this - #1804926: Convert register_pending_approval_admin email to config system and provide the ability to configure it in UI. - so marking this as duplicate - yes I know this one was definitely first (1,000,000 nodes earlier!) but that issue already has a D8 patch.