Make WordPress Core

Ticket #39370: 39370.patch

File 39370.patch, 636 bytes (added by alfhen, 8 years ago)

Patch with the mentioned fix

  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 5edf971..3067278 100644
    a b function wp_insert_user( $userdata ) { 
    16121612
    16131613        $user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login));
    16141614
    1615         if ( $user_nicename_check && $ID != $user_nicename_check ) {
     1615        if ( $user_nicename_check ) {
    16161616                $suffix = 2;
    16171617                while ($user_nicename_check) {
    16181618                        // user_nicename allows 50 chars. Subtract one for a hyphen, plus the length of the suffix.