Changeset 8731 for trunk/wp-includes/pluggable.php
- Timestamp:
- 08/25/2008 09:09:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r8730 r8731 485 485 * @return bool|int False if invalid cookie, User ID if valid. 486 486 */ 487 function wp_validate_auth_cookie($cookie = '', $scheme = ' auth') {487 function wp_validate_auth_cookie($cookie = '', $scheme = '') { 488 488 if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) { 489 489 do_action('auth_cookie_malformed', $cookie, $scheme); … … 560 560 * @return array Authentication cookie components 561 561 */ 562 function wp_parse_auth_cookie($cookie = '', $scheme = ' auth') {562 function wp_parse_auth_cookie($cookie = '', $scheme = '') { 563 563 if ( empty($cookie) ) { 564 if ( is_ssl() ) { 565 $cookie_name = SECURE_AUTH_COOKIE; 566 $scheme = 'secure_auth'; 567 } else { 568 $cookie_name = AUTH_COOKIE; 569 $scheme = 'auth'; 570 } 564 switch ($scheme){ 565 case 'auth': 566 $cookie_name = AUTH_COOKIE; 567 break; 568 case 'secure_auth': 569 $cookie_name = SECURE_AUTH_COOKIE; 570 break; 571 case "logged_in": 572 $cookie_name = LOGGED_IN_COOKIE; 573 break; 574 default: 575 if ( is_ssl() ) { 576 $cookie_name = SECURE_AUTH_COOKIE; 577 $scheme = 'secure_auth'; 578 } else { 579 $cookie_name = AUTH_COOKIE; 580 $scheme = 'auth'; 581 } 582 } 571 583 572 584 if ( empty($_COOKIE[$cookie_name]) )
Note: See TracChangeset
for help on using the changeset viewer.