title: WordPress user functionally created successfully but 'SB Welcome Email' not sent
body: <p>I have created wp user by functions and it's working successfully. Now the problem is <code>SB Welcome Email</code> not sent if the user created by function but If I created manually user from dashboard then mail has been sent. I don't want to use another custom wp_mail() for custom user creation by functions. How can I overcome this? <a href="https://github.com/timstl/SB-Welcome-Email-Editor/blob/master/sb_welcome_email_editor.php" rel="nofollow noreferrer">SB Welcome Email Code</a></p>
  
  <pre><code>$user_login     =  wp_slash( $username );
      $user_email     =  wp_slash( $email );
      $display_name   =  wp_slash( $full_name );
      $first_name     =  wp_slash( $f_name );
      $last_name      =  wp_slash( $l_name );
      $user_pass      =  $password;
      $role           =  'student';
      $exists = email_exists( $user_email );
  
      if ( username_exists( $user_login ) &amp;&amp; !email_exists( $user_email ) ) {
          $user_login = $user_login.'_student';
      } else {
          $user_login = $user_login;
      }
  
  
      if ( !$exists ) {
          $userdata = compact( 'user_login', 'user_email', 'user_pass', 'display_name', 'first_name', 'last_name', 'role' );
          //return wp_insert_user( $userdata );
          $user_id = wp_insert_user( $userdata ) ;
  
      }else{
          $user   = get_user_by( 'email', $user_email );
          $user_id = $user-&gt;ID;
      }
  </code></pre>