WordPress.org

Make WordPress Core

Ticket #24618: enhance.vun.diff

File enhance.vun.diff, 466 bytes (added by gwinh.lopez, 9 years ago)
  • wp-includes/user.php

    diff --git wp-includes/user.php wp-includes/user.php
    index f22b046..a99fde9 100644
    function email_exists( $email ) { 
    12261226 */
    12271227function validate_username( $username ) {
    12281228        $sanitized = sanitize_user( $username, true );
    1229         $valid = ( $sanitized == $username );
     1229        $valid = !empty($sanitized) ? ( $sanitized == $username ) : false;
    12301230        return apply_filters( 'validate_username', $valid, $username );
    12311231}
    12321232