Changeset 252 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
- Timestamp:
- Jun 4, 2009, 2:02:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
r232 r252 51 51 52 52 } else { 53 // WP 2.7original53 // WP original 54 54 if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 55 55 return false; … … 58 58 return; 59 59 60 if ( ! $user = wp_validate_auth_cookie() ) { 61 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { 62 wp_set_current_user(0); 63 return false; 64 } 65 } 66 67 wp_set_current_user($user); 60 if (function_exists('wp_validate_auth_cookie')){ 61 if ( ! $user = wp_validate_auth_cookie() ) { 62 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { 63 wp_set_current_user(0); 64 return false; 65 } 66 } 67 wp_set_current_user($user); 68 } else { // for WP2.0 69 if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) || 70 !wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) { 71 wp_set_current_user(0); 72 return false; 73 } 74 $user_login = $_COOKIE[USER_COOKIE]; 75 wp_set_current_user(0, $user_login); 76 } 68 77 } 69 78 } … … 77 86 if(is_object($xoopsUser)){ 78 87 $u_name = $xoopsUser->getVar("uname"); 79 $u_pass_md5 = $xoopsUser->getVar("pass"); 88 $u_pass_md5 = $xoopsUser->getVar("pass"); 80 89 if ( ! empty($u_name) && ! empty($u_pass_md5) ) { 81 90 include_once dirname( __FILE__ ).'/user_sync_xoops.php'; … … 96 105 wp_set_current_user(0); 97 106 wp_clearcookie(); 98 return 0; 107 return 0; 99 108 } 100 109 endif;
Note: See TracChangeset
for help on using the changeset viewer.