Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 861)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 862)
@@ -32,5 +32,5 @@
 {
 	global $current_user;
-	get_currentuserinfo();
+	xpress_get_current_user();
 	if (xpress_user_access_level() > 3)
 		return true;
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 861)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 862)
@@ -17,4 +17,22 @@
 if ( !function_exists('get_currentuserinfo') ) :
 function get_currentuserinfo() {
+    global $current_user;
+    global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
+    xpress_get_current_user();    
+}
+endif;
+
+if ( !function_exists('wp_get_current_user') ) :
+function wp_get_current_user() {
+    global $current_user;
+    global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
+    xpress_get_current_user();
+    return $current_user;
+}
+endif;
+
+
+if ( !function_exists('xpress_get_current_user') ) :
+function xpress_get_current_user() {
 	global $current_user;
 	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
@@ -72,5 +90,13 @@
 				 }
 			}
-			wp_set_current_user($user);
+			$user_id = apply_filters( 'determine_current_user', false );
+			if ( ! $user_id ) {
+			    wp_set_current_user( 0 );
+			    return false;
+			}
+
+			wp_set_current_user( $user_id );
+
+//			wp_set_current_user($user);
 		} else { // for WP2.0
 			if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) ||
