Make WordPress Core

Ticket #57967: 57967.patch

File 57967.patch, 795 bytes (added by polevaultweb, 21 months ago)
  • src/wp-includes/user.php

    Subject: [PATCH] 57967
    ---
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    a b  
    21292129        }
    21302130
    21312131        // Username must not match an existing user email.
    2132         if ( email_exists( $user_login ) ) {
     2132        $existing_user_id = email_exists( $user_login );
     2133        if ( $existing_user_id && ( ! $update || ( $user_id && $existing_user_id !== $user_id ) ) ) {
    21332134                return new WP_Error( 'existing_user_email_as_login', __( 'Sorry, that username is not available.' ) );
    21342135        }
    21352136