Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Oct 2012 at 20:44 UTC
Updated:
29 Jul 2014 at 21:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rbayliss commentedComment #2
alexpottThis is not precisely the same as it was in Drupal 7. It should be:
Comment #3
ela.m commentedComment #4
ela.m commentedJust added the "\n\n"s..
Comment #5
ela.m commentedComment #6
aspilicious commentedI'm so confused about this. Where does this ever gets called? Can it be set in the UI? Where?
Comment #7
adammaloneIt's not actually set in the UI anywhere but after a bit of a trace I think I've found where it gets called.
register_pending_approval_admin is the mail key set when admin approval is required for user registration and the mail is going to the admin. This is called from the user module.
The drupal_mail function calls any functions which are of the type $module . '_mail' (user_mail function).
Within user_mail the subject and body are created by calling _user_mail_text with the $key (register_pending_approval_admin) followed by .subject or .body respectively.
_user_mail_text then does a config lookup with what is passed to it (register_pending_approval_admin.subject etc).
Perhaps then this should be a user configurable setting - to allow the email sent to admins when there is a new user awaiting approval to be customised?
I'm still relatively new to the whole CMI scene so my user_update_N function may not be correct. As far as I can tell though, that config does need to be set as it does get called.
Comment #8
edrupal commentedIt looks like this functionality is also being addressed by patch 809806-Register pending approval admin mails not configurable.patch in issue Register pending approval admin mails not configurable?.No idea which is the better approach.Please ignore, I was getting my versions confused.
Comment #9
edrupal commentedThe last section of the patch in #7 above failed to apply for me (the user.install changes)
Comment #10
adammaloneIt may need rerolling for updates to HEAD
Comment #11
alexpottThis function needs to migrate the variable from Drupal 7. There is a helper function to do this. See http://api.drupal.org/api/drupal/core!modules!user!user.install/function... for how to do this.
Actually this is a special case since the user.mail.yml in already updated by user_update_8006() so you can just add the two new variables to the conversion function.
Comment #12
alexpottComment #13
tstoecklerComment #14
yesct commentedin case @edrupal or anyone else wants to try a reroll, here is the doc page for rerolls http://drupal.org/patch/reroll
Comment #15
edrupal commentedI've had a go at re-rolling the patch in #7. Also made the following changes:
Ed
Comment #16
adammaloneSetting the issue status to 'needs review' will trigger the review bot to test the patch.
Comment #17
berdirLooks good to me. Does not have upgrade test coverage, but I don't think that we need explicit coverage for every single trivial variable.
Comment #18
yesct commentedPer #17 removing tag
Note this is blocking #494518: Allow for custom user registration approval email address
Comment #19
yesct commented#15: register_pending_approval_admin-1804926-15.patch queued for re-testing.
Comment #20
yesct commentedSince it had been 5 days, and d8 is moving fast, I used the re-test link on the most recent patch to have to testbot test it again. That way we can reroll it if needed.
Comment #21
catchCommitted/pushed to 8.x, thanks!