mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Fix checking for whether WP_User object is actually a user. props filosofo, fixes #13903 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15404 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -265,7 +265,7 @@ switch ( $_GET['action'] ) {
|
||||
reset( $newroles );
|
||||
foreach ( (array) $newroles as $userid => $role ) {
|
||||
$user = new WP_User( $userid );
|
||||
if ( ! $user )
|
||||
if ( empty( $user->ID ) )
|
||||
continue;
|
||||
$user->for_blog( $id );
|
||||
$user->set_role( $role );
|
||||
|
||||
Reference in New Issue
Block a user