Changeset 6529
- Timestamp:
- 12/31/2007 05:50:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r6486 r6529 358 358 endif; 359 359 360 if ( !function_exists('wp_generate_auth_cookie') ) : 361 function wp_generate_auth_cookie($user_id, $expiration) { 362 $user = get_userdata($user_id); 363 364 $key = wp_hash($user->user_login . $expiration); 365 $hash = hash_hmac('md5', $user->user_login . $expiration, $key); 366 367 $cookie = $user->user_login . '|' . $expiration . '|' . $hash; 368 369 return apply_filters('auth_cookie', $cookie, $user_id, $expiration); 370 } 371 endif; 372 360 373 if ( !function_exists('wp_set_auth_cookie') ) : 361 374 function wp_set_auth_cookie($user_id, $remember = false) { … … 369 382 } 370 383 371 $key = wp_hash($user->user_login . $expiration); 372 $hash = hash_hmac('md5', $user->user_login . $expiration, $key); 373 374 $cookie = $user->user_login . '|' . $expiration . '|' . $hash; 384 $cookie = wp_generate_auth_cookie($user_id, $expiration); 375 385 376 386 do_action('set_auth_cookie', $cookie, $expire);
Note: See TracChangeset
for help on using the changeset viewer.