Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!!!

share|improve this question
add comment

2 Answers

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

Check here (plugin - WelcomeUser!)

share|improve this answer
    
It has nothing to do with welcome email. –  noc2spam Sep 11 '13 at 16:46
add comment

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;
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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