Changeset 21413 for trunk/wp-includes/capabilities.php
- Timestamp:
- 08/03/2012 01:06:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r21377 r21413 1238 1238 1239 1239 // Create new object to avoid stomping the global current_user. 1240 $user = new WP_User( $current_user->ID );1240 $user = new WP_User( $current_user->ID ); 1241 1241 1242 1242 // Set the blog id. @todo add blog id arg to WP_User constructor? … … 1262 1262 return false; 1263 1263 1264 $author = new WP_User( $post->post_author );1265 1266 if ( empty( $author->ID ))1264 $author = get_userdata( $post->post_author ); 1265 1266 if ( ! $author ) 1267 1267 return false; 1268 1268 … … 1284 1284 function user_can( $user, $capability ) { 1285 1285 if ( ! is_object( $user ) ) 1286 $user = new WP_User( $user );1286 $user = get_userdata( $user ); 1287 1287 1288 1288 if ( ! $user || ! $user->exists() )
Note: See TracChangeset
for help on using the changeset viewer.