Make WordPress Core


Ignore:
Timestamp:
11/12/2015 04:29:45 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Users: After [35189], make 'illegal_user_logins' check case-insensitive.

Props juliobox.
Fixes #27317.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user-functions.php

    r35618 r35629  
    13291329     * @param array $usernames Array of blacklisted usernames.
    13301330     */
    1331     if ( in_array( $user_login, apply_filters( 'illegal_user_logins', array() ) ) ) {
     1331    $illegal_logins = apply_filters( 'illegal_user_logins', array() );
     1332
     1333    if ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {
    13321334        return new WP_Error( 'illegal_user_login', __( 'Sorry, that username is not allowed.' ) );
    13331335    }
Note: See TracChangeset for help on using the changeset viewer.