Skip confirmation email fixes. Props ocean90, duck_. see #15725

git-svn-id: http://svn.automattic.com/wordpress/trunk@16949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-15 16:04:19 +00:00
parent 60aa1d3062
commit 93908c2670
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
}
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
if ( isset( $_POST[ 'adduser' ] ) && isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) );
wpmu_activate_signup( $key );
$redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' );

View File

@ -1387,7 +1387,7 @@ function add_new_user_to_blog( $user_id, $email, $meta ) {
if ( $meta[ 'add_to_blog' ] ) {
$blog_id = $meta[ 'add_to_blog' ];
$role = $meta[ 'new_role' ];
remove_user_from_blog($user_id, $current_site->blogid); // remove user from main blog.
remove_user_from_blog($user_id, $current_site->blog_id); // remove user from main blog.
add_user_to_blog( $blog_id, $user_id, $role );
update_user_meta( $user_id, 'primary_blog', $blog_id );
}