hope you can help me. users can chose between subscriber and editor role on my website. now, i'd like to send a register welcome mail to EDITORS only (WITH a specific) text. subscribers must not receive a welcome mail.

any chance?

looking forward hearing from you! THANKS!!!


ah, there is a plugin that does this, but it also have some more features.

Check here (plugin - WelcomeUser!)

  • It has nothing to do with welcome email. – Gogol Sep 11 '13 at 16:46

add to your functions.php file:

add_filter('wpmu_signup_user_notification', 'my_if_notification_required');

function my_if_notification_required( $user ){
    $user = get_userdatabylogin( $user );
    if( $user && in_array('editor', $user->roles) ) return true;
    else return false;

add_filter( 'wpmu_signup_user_notification_email', 'my_notification_text');

function my_notification_text( $user, $user_email, $key, $meta ){
    $user = get_userdatabylogin( $user );
    if( !$user || !in_array('editor', $user->roles) ) return false;
    $message = 'Your message';
    return $message;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.