Changeset 293 for branches/Ver2.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
- Timestamp:
- Jun 18, 2009, 12:42:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
r291 r293 20 20 global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin; 21 21 22 23 22 if ($xoopsModule){ 24 if (!is_object($xoopsUser)){25 wp_set_current_user(0);26 if ( !preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']) &&27 !preg_match("/msie/", $_SERVER['HTTP_USER_AGENT']) ) {28 wp_logout(); // When IE is used, it becomes page error by the guest if the wp_logout() is executed here.29 }30 return false;31 }32 23 if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 33 24 return false; 34 25 35 if ( ! empty($current_user) ){ 36 $xoops_user = $xoopsUser->getVar("uname"); 37 if ($current_user->user_login == $xoops_user) 38 return; 39 } 40 41 if (check_xpress_auth_cookie()){ //The cookie is login user's or it checks it 42 if ( $user = wp_validate_auth_cookie() ) { 43 if (!check_user_meta_prefix($user)){ 44 repair_user_meta_prefix(); 26 if (is_object($xoopsUser)){ // When the user is logging in xoops 27 if ( ! empty($current_user) ){ 28 $xoops_user = $xoopsUser->getVar("uname"); 29 if ($current_user->user_login == $xoops_user){ // If xoops login user and wordpress current user are the same 30 return; 45 31 } 46 47 wp_set_current_user($user);48 return ;49 32 } 50 } 51 xpress_login(); 52 33 if (check_xpress_auth_cookie()){ //The cookie is login user's or it checks it 34 if ( $user = wp_validate_auth_cookie() ) { 35 // When the user meta prefix is different according to the change in the xoops data base prefix, it restores it. 36 if (!check_user_meta_prefix($user)){ 37 repair_user_meta_prefix(); 38 } 39 wp_set_current_user($user); 40 return ; 41 } 42 } 43 return xpress_login(); 44 } else { // For the xoops guest 45 if ( ! empty($current_user) ){ // When a current user of wordpress is set, a current user is cleared. 46 wp_set_current_user(0); 47 wp_logout(); 48 wp_clear_auth_cookie(); 49 } 50 return false; 51 } 53 52 } else { 54 53 // WP2.7 original
Note: See TracChangeset
for help on using the changeset viewer.