Changeset 20378 for trunk/wp-includes/capabilities.php
- Timestamp:
- 04/06/2012 07:18:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r19712 r20378 597 597 598 598 $this->data->$key = $value; 599 } 600 601 /** 602 * Determine whether the user exists in the database. 603 * 604 * @since 3.4.0 605 * @access public 606 * 607 * @return bool True if user exists in the database, false if not. 608 */ 609 function exists() { 610 return ! empty( $this->ID ); 599 611 } 600 612 … … 1260 1272 $user = new WP_User( $user ); 1261 1273 1262 if ( ! $user || ! $user-> ID)1274 if ( ! $user || ! $user->exists() ) 1263 1275 return false; 1264 1276 … … 1357 1369 $user = wp_get_current_user(); 1358 1370 1359 if ( empty( $user->ID) )1371 if ( ! $user->exists() ) 1360 1372 return false; 1361 1373
Note: See TracChangeset
for help on using the changeset viewer.