- Timestamp:
- Feb 4, 2009, 5:52:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/pluggable-override.php
r86 r87 21 21 22 22 23 if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 24 return false; 23 if ($xoopsModule){ 24 if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 25 return false; 25 26 26 if ( ! empty($current_user) )27 return;27 if ( ! empty($current_user) ) 28 return; 28 29 29 if ($xoopsModule){30 30 if (check_xpress_auth_cookie()){ //The cookie is login user's or it checks it 31 31 if ( $user = wp_validate_auth_cookie() ) { … … 34 34 } 35 35 } 36 xpress_login(); 36 xpress_login(); 37 37 38 38 } else { … … 59 59 global $current_user; 60 60 61 if(is_object($GLOBALS["xoopsUser"])){ 62 $u_name = $GLOBALS["xoopsUser"]->getVar("uname"); 63 $u_pass_md5 = $GLOBALS["xoopsUser"]->getVar("pass"); 64 if ( ! empty($u_name) && ! empty($u_pass_md5) ) { 65 include_once dirname( __FILE__ ).'/user_sync_xoops.php'; 66 $messege = ''; 67 $ret = user_sync_to_wordpress($GLOBALS["xoopsUser"]->getVar("uid"),$messege); 68 if ($ret){ 69 $user = new WP_User(0, $u_name); 70 if ( wp_login($u_name, $u_pass_md5) ) { 71 wp_setcookie($u_name, $u_pass_md5, true, '', '', false); 72 do_action('wp_login', $u_name); 73 wp_set_current_user($user->ID); 74 return true; 75 } 76 }else { 77 // echo $messege; 78 } 61 if(is_object($GLOBALS["xoopsUser"])){ 62 $u_name = $GLOBALS["xoopsUser"]->getVar("uname"); 63 $u_pass_md5 = $GLOBALS["xoopsUser"]->getVar("pass"); 64 if ( ! empty($u_name) && ! empty($u_pass_md5) ) { 65 include_once dirname( __FILE__ ).'/user_sync_xoops.php'; 66 repair_user_meta_prefix(); //Repair when data base prefix is changed on XOOPS side 67 $messege = ''; 68 $ret = user_sync_to_wordpress($GLOBALS["xoopsUser"]->getVar("uid"),$messege); 69 if ($ret){ 70 $user = new WP_User(0, $u_name); 71 if ( wp_login($u_name, $u_pass_md5) ) { 72 wp_setcookie($u_name, $u_pass_md5, true, '', '', false); 73 do_action('wp_login', $u_name); 74 wp_set_current_user($user->ID); 75 return true; 79 76 } 80 77 } 81 wp_set_current_user(0); 82 return 0; 78 } 79 } 80 wp_set_current_user(0); 81 return 0; 83 82 } 84 83
Note: See TracChangeset
for help on using the changeset viewer.