Changeset 4504

Show
Ignore:
Timestamp:
11/20/06 04:29:06 (2 years ago)
Author:
ryan
Message:

ID instead of id. Props Nazgul. fixes #3152

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/users.php

    r4480 r4504  
    136136            wp_die(__('You can’t edit that user.')); 
    137137        // The new role of the current user must also have edit_users caps 
    138         if($id == $current_user->id && !$wp_roles->role_objects[$_POST['new_role']]->has_cap('edit_users')) { 
     138        if($id == $current_user->ID && !$wp_roles->role_objects[$_POST['new_role']]->has_cap('edit_users')) { 
    139139            $update = 'err_admin_role'; 
    140140            continue; 
     
    170170            wp_die(__('You can’t delete that user.')); 
    171171 
    172         if($id == $current_user->id) { 
     172        if($id == $current_user->ID) { 
    173173            $update = 'err_admin_del'; 
    174174            continue; 
     
    218218    foreach ( (array) $userids as $id ) { 
    219219        $user = new WP_User($id); 
    220         if ( $id == $current_user->id ) { 
     220        if ( $id == $current_user->ID ) { 
    221221            echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n"; 
    222222        } else { 
     
    228228    $user_dropdown = '<select name="reassign_user">'; 
    229229    foreach ( (array) $all_logins as $login ) 
    230         if ( $login->ID == $current_user->id || !in_array($login->ID, $userids) ) 
     230        if ( $login->ID == $current_user->ID || !in_array($login->ID, $userids) ) 
    231231            $user_dropdown .= "<option value=\"{$login->ID}\">{$login->user_login}</option>"; 
    232232    $user_dropdown .= '</select>'; 
  • trunk/wp-includes/capabilities.php

    r4495 r4504  
    131131class WP_User { 
    132132    var $data; 
    133     var $id = 0; 
     133    var $ID = 0; 
     134    var $id = 0; // Deprecated, use $ID instead. 
    134135    var $caps = array(); 
    135136    var $cap_key; 
     
    194195    function add_role($role) { 
    195196        $this->caps[$role] = true; 
    196         update_usermeta($this->id, $this->cap_key, $this->caps); 
     197        update_usermeta($this->ID, $this->cap_key, $this->caps); 
    197198        $this->get_role_caps(); 
    198199        $this->update_user_level_from_caps(); 
     
    203204            return; 
    204205        unset($this->caps[$role]); 
    205         update_usermeta($this->id, $this->cap_key, $this->caps); 
     206        update_usermeta($this->ID, $this->cap_key, $this->caps); 
    206207        $this->get_role_caps(); 
    207208    } 
     
    216217            $this->roles = false; 
    217218        } 
    218         update_usermeta($this->id, $this->cap_key, $this->caps); 
     219        update_usermeta($this->ID, $this->cap_key, $this->caps); 
    219220        $this->get_role_caps(); 
    220221        $this->update_user_level_from_caps(); 
     
    262263 
    263264        $args = array_slice(func_get_args(), 1); 
    264         $args = array_merge(array($cap, $this->id), $args); 
     265        $args = array_merge(array($cap, $this->ID), $args); 
    265266        $caps = call_user_func_array('map_meta_cap', $args); 
    266267        // Must have ALL requested caps