wpmu_validate_user_signup() should strictly check against false when using strpos().

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32942 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-06-25 16:56:01 +00:00
parent cd188f40d1
commit 6690882fc1

View File

@ -494,7 +494,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
if ( strlen( $user_name ) < 4 )
$errors->add('user_name', __( 'Username must be at least 4 characters.' ) );
if ( strpos( ' ' . $user_name, '_' ) != false )
if ( strpos( ' ' . $user_name, '_' ) !== false )
$errors->add( 'user_name', __( 'Sorry, usernames may not contain the character &#8220;_&#8221;!' ) );
// all numeric?