Make WordPress Core


Ignore:
Timestamp:
11/12/2015 04:29:45 PM (9 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-admin/includes/user.php

    r35190 r35629  
    144144
    145145    /** This filter is documented in wp-includes/user-functions.php */
    146     if ( in_array( $user->user_login, apply_filters( 'illegal_user_logins', array() ) ) ) {
     146    $illegal_logins = apply_filters( 'illegal_user_logins', array() );
     147
     148    if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {
    147149        $errors->add( 'illegal_user_login', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
    148150    }
Note: See TracChangeset for help on using the changeset viewer.