Making WordPress.org

Changeset 3358


Ignore:
Timestamp:
06/14/2016 12:11:25 PM (9 years ago)
Author:
dd32
Message:

Plugin Directory: When sanitizing the contributors in the readme, ensure that we match the case of the user login.

See #1724

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-readme-parser.php

    r3349 r3358  
    360360    protected function sanitize_contributors( $users ) {
    361361        foreach ( $users as $i => $name ) {
    362             if ( get_user_by( 'login', $name ) ) {
    363                 continue;
     362            if ( $user = get_user_by( 'login', $name ) ) {
     363                // Check the case of the user login matches.
     364                if ( $name !== $user->user_login ) {
     365                    $users[ $i ] = $user->user_login;
     366                }
    364367            } elseif ( false !== ( $user = get_user_by( 'slug', $name ) ) ) {
    365368                // Overwrite the nicename with the user_login
Note: See TracChangeset for help on using the changeset viewer.