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:
Andrew Nacin
2010-07-13 21:27:05 +00:00
parent dc3140a664
commit 97366f31f0
3 changed files with 7 additions and 7 deletions

View File

@@ -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 );