Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6/wp-includes/ms-functions.php

    r24155 r25198  
    379379
    380380    if ( $banned_names && is_array( $banned_names ) ) {
    381         list( $email_local_part, $email_domain ) = explode( '@', $user_email );
     381        $banned_names = array_map( 'strtolower', $banned_names );
     382        $normalized_email = strtolower( $user_email );
     383
     384        list( $email_local_part, $email_domain ) = explode( '@', $normalized_email );
    382385
    383386        foreach ( $banned_names as $banned_domain ) {
     
    391394
    392395            $dotted_domain = ".$banned_domain";
    393             if ( $dotted_domain === substr( $user_email, -strlen( $dotted_domain ) ) ) {
     396            if ( $dotted_domain === substr( $normalized_email, -strlen( $dotted_domain ) ) ) {
    394397                $is_email_address_unsafe = true;
    395398                break;
     
    899902        return false;
    900903
    901     $user = new WP_User( $user_id );
    902 
    903904    // Newly created users have no roles or caps until they are added to a blog.
    904     delete_user_option( $user_id, $user->cap_key );
     905    delete_user_option( $user_id, 'capabilities' );
    905906    delete_user_option( $user_id, 'user_level' );
    906907
Note: See TracChangeset for help on using the changeset viewer.