mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add magic get/set/isset methods to WP_User to avoid data duplication. Standardize on WP_User::ID. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -216,7 +216,7 @@ case 'doremove':
|
||||
$update = 'remove';
|
||||
foreach ( $userids as $id ) {
|
||||
$id = (int) $id;
|
||||
if ( $id == $current_user->id && !is_super_admin() ) {
|
||||
if ( $id == $current_user->ID && !is_super_admin() ) {
|
||||
$update = 'err_admin_remove';
|
||||
continue;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ case 'remove':
|
||||
foreach ( $userids as $id ) {
|
||||
$id = (int) $id;
|
||||
$user = new WP_User($id);
|
||||
if ( $id == $current_user->id && !is_super_admin() ) {
|
||||
if ( $id == $current_user->ID && !is_super_admin() ) {
|
||||
echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n";
|
||||
} elseif ( !current_user_can('remove_user', $id) ) {
|
||||
echo "<li>" . sprintf(__('ID #%1s: %2s <strong>You don\'t have permission to remove this user.</strong>'), $id, $user->user_login) . "</li>\n";
|
||||
|
||||
Reference in New Issue
Block a user