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:
Ryan Boren 2011-05-04 18:38:17 +00:00
parent a5572fa5ef
commit f0a83251ec
1 changed files with 1 additions and 1 deletions

View File

@ -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.