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/ms-functions.php

    r35325 r35629  
    433433
    434434    /** This filter is documented in wp-includes/user-functions.php */
    435     if ( in_array( $user_name, apply_filters( 'illegal_user_logins', array() ) ) ) {
     435    $illegal_logins = apply_filters( 'illegal_user_logins', array() );
     436
     437    if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) {
    436438        $errors->add( 'user_name',  __( 'Sorry, that username is not allowed.' ) );
    437439    }
Note: See TracChangeset for help on using the changeset viewer.