Make WordPress Core

Ticket #38665: 38665.3.diff

File 38665.3.diff, 1003 bytes (added by johnbillion, 6 years ago)
  • src/wp-admin/includes/user.php

    diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
    index f99c50d85c..258a3bb7e4 100644
    a b function edit_user( $user_id = 0 ) { 
    112112                }
    113113        }
    114114
     115        if ( $update ) {
     116                $user->locale = '';
     117        }
     118
    115119        if ( isset( $_POST['locale'] ) ) {
    116120                $locale = sanitize_text_field( $_POST['locale'] );
    117121                if ( 'site-default' === $locale ) {
    function edit_user( $user_id = 0 ) { 
    130134                $user->syntax_highlighting  = isset( $_POST['syntax_highlighting'] ) && 'false' === $_POST['syntax_highlighting'] ? 'false' : 'true';
    131135                $user->admin_color          = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh';
    132136                $user->show_admin_bar_front = isset( $_POST['admin_bar_front'] ) ? 'true' : 'false';
    133                 $user->locale               = '';
    134137        }
    135138
    136139        $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : '';