Changeset 27484 for trunk/src/wp-includes/user.php
- Timestamp:
- 03/09/2014 03:22:13 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/user.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r27354 r27484 218 218 } 219 219 return $user; 220 } 221 222 /** 223 * Validates logged in cookie. 224 * 225 * Checks the logged_in cookie if the previous auth cookie could not be 226 * validated and parsed. 227 * 228 * This is a callback for the determine_current_user filter, rather than API. 229 * 230 * @since 3.9.0 231 * 232 * @param int|boolean $user The user ID (or false) as received from the determine_current_user filter. 233 * @return int|boolean User ID if validated, or false otherwise. If it receives a user ID from 234 * an earlier filter callback, that value is returned. 235 */ 236 function wp_validate_logged_in_cookie( $user_id ) { 237 if ( $user_id ) { 238 return $user_id; 239 } 240 241 if ( is_blog_admin() || is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) ) { 242 return false; 243 } 244 245 return wp_validate_auth_cookie( $_COOKIE[LOGGED_IN_COOKIE], 'logged_in' ); 220 246 } 221 247
Note: See TracChangeset
for help on using the changeset viewer.