Skip to content

Commit a9e2f1c

Browse files
Coding Standards: Use strict comparison in wpmu_validate_user_signup().
Follow-up to [14298], [19852]. Props debarghyabanerjee. See #62283. git-svn-id: https://develop.svn.wordpress.org/trunk@59557 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 07be244 commit a9e2f1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/ms-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ function wpmu_validate_user_signup( $user_name, $user_email ) {
462462
$orig_username = $user_name;
463463
$user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
464464

465-
if ( $user_name != $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) {
465+
if ( $user_name !== $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) {
466466
$errors->add( 'user_name', __( 'Usernames can only contain lowercase letters (a-z) and numbers.' ) );
467467
$user_name = $orig_username;
468468
}

0 commit comments

Comments
 (0)