Check if empty to avoid noticed when signing up for username in multisite. Props jfarthing84, kawauso. fixes #16680
git-svn-id: https://develop.svn.wordpress.org/trunk@17794 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a5572fa5ef
commit
f0a83251ec
@ -1860,7 +1860,7 @@ function add_existing_user_to_blog( $details = false ) {
|
||||
*/
|
||||
function add_new_user_to_blog( $user_id, $email, $meta ) {
|
||||
global $current_site;
|
||||
if ( $meta[ 'add_to_blog' ] ) {
|
||||
if ( !empty( $meta[ 'add_to_blog' ] ) ) {
|
||||
$blog_id = $meta[ 'add_to_blog' ];
|
||||
$role = $meta[ 'new_role' ];
|
||||
remove_user_from_blog($user_id, $current_site->blog_id); // remove user from main blog.
|
||||
|
Loading…
Reference in New Issue
Block a user