WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/15/2010 06:38:10 AM (9 years ago)
Author:
nacin
Message:

Properly check, initialize, or cast a number of variables. props ChenHui. see #14642.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r15896 r16377  
    5656function edit_user( $user_id = 0 ) {
    5757    global $wp_roles, $wpdb;
    58     if ( $user_id != 0 ) {
     58    $user = new WP_User( $user_id );
     59    if ( $user_id ) {
    5960        $update = true;
    6061        $user->ID = (int) $user_id;
     
    6364    } else {
    6465        $update = false;
    65         $user = '';
    6666    }
    6767
Note: See TracChangeset for help on using the changeset viewer.