New member request email
-
How can I have the New member request email sent to the Administrator and a self-created role in plugin User Role Editor?
For example role with the name “User1”
Thanks
-
Just to make sure I’m interpreting this correct, you want to expand who receives the notification to be going to both the site admin, and then whoever may also have this custom role that you’re going to set up?
Borrowing from myself 3 days ago…
function terry_bpro_single_admin_notice( $current_admins ) { $custom_admins = get_users( 'role=ENTER_ROLE_HERE' ); foreach( $custom_admins as $custom_admin ) { // append new WP_Users into our passed in array $current_admins[] = $custom_admin; } return $current_admins; } add_filter( 'bprwg_bp_notification_users', 'terry_bpro_single_admin_notice' );This code should handle. The
$current_adminswill be an array of WP_User objects who have the “administrator” role, and we push the WP_User objects from your custom role into the array, and pass it back.Give it a try, make sure to fill in the final result for the role you’re going to make.
pasted your complete piece at the bottom of my functions.php, after last line see:
} add_filter( 'rtmedia_no_media_found_message_filter', 'custom_no_media_found_message_function' ,10, 1 );Then get critical error as a notification… ???
Received an email from the site about this error (names changed of course)
First visit your site and see if there are any visible problems.
Then visit the page where the error was found (https://xxxxx.nl/xxxxxxxx/xxxxxx/wp-admin/users.php?role=user1) and see if there are any visible problems.I hope this helps
What’s the actual error message you’re seeing?
Only a small window with:
A critical error has occurred on your site.I also use the plugin:
Multiple Admin Email Addresses
These are separated by a comma (2 addresses)If you can manage to send the “New member request” email to these two addresses, that’s fine too
Typically, at least from what I’ve seen, the email notifications for the site experienced an issue stuff, will provide at least some of the actual error.
I remember another conflict with the two addresses in the administrator settings.
Maybe that has to do with this too?
Potentially, but hard to say for certain. I am guessing they’re probably filtering the arguments passed to
wp_mail()I have disabled / removed the duplicate email function but this has no effect. I am still getting the critical error.
Any more ideas?
Not without actually seeing the error in question. Your hosting provider will probably have a spot to review error logs.
I have a test site. Is access useful to you?
Not too much unless it shows errors better. If you’re able to access it still, the contents of your functions.php would actually be better from my end, because I could at least check for possible php errors or try the file on a local install.
The topic ‘New member request email’ is closed to new replies.