Make WordPress Core


Ignore:
Timestamp:
08/04/2011 03:09:27 AM (15 years ago)
Author:
ryan
Message:

Add magic get/set/isset methods to WP_User to avoid data duplication. Standardize on WP_User::ID. Props scribu. see #15458

File:
1 edited

Legend:

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

    r17977 r18504  
    217217        foreach ( $userids as $id ) {
    218218                $id = (int) $id;
    219                 if ( $id == $current_user->id && !is_super_admin() ) {
     219                if ( $id == $current_user->ID && !is_super_admin() ) {
    220220                        $update = 'err_admin_remove';
    221221                        continue;
     
    270270                $id = (int) $id;
    271271                $user = new WP_User($id);
    272                 if ( $id == $current_user->id && !is_super_admin() ) {
     272                if ( $id == $current_user->ID && !is_super_admin() ) {
    273273                        echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n";
    274274                } elseif ( !current_user_can('remove_user', $id) ) {
Note: See TracChangeset for help on using the changeset viewer.