Make WordPress Core

Ticket #27317: 27317.patch

File 27317.patch, 585 bytes (added by crazycoolcam, 11 years ago)

Patch to user.php

  • user.php

     
    15321532         * @param string $user_login Username after it has been sanitized.
    15331533         */
    15341534        $user_login = apply_filters( 'pre_user_login', $user_login );
     1535        if ( is_wp_error($user_login) ) //Test if filter returned a WP_error object.
     1536                return $user_login; //Let's return the error.
    15351537
     1538
    15361539        //Remove any non-printable chars from the login string to see if we have ended up with an empty username
    15371540        $user_login = trim($user_login);
    15381541