Check if empty to avoid noticed when signing up for username in multisite. Props jfarthing84, kawauso. fixes #16680

git-svn-id: http://svn.automattic.com/wordpress/trunk@17794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-05-04 18:38:17 +00:00
parent d55f5b35af
commit 1835dbf737

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.