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 844)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 845)
@@ -35,5 +35,5 @@
 				if (function_exists('wp_validate_auth_cookie')){
 					if ( $user = wp_validate_auth_cookie() ) {
-						// When the user meta prefix is different according to the change in the xoops data base prefix, it restores it. 
+						// When the user meta prefix is different according to the change in the xoops data base prefix, it restores it.
 						if (!check_user_meta_prefix($user)){
 							repair_user_meta_prefix();
@@ -42,5 +42,5 @@
 						return ;
 					}
-				} else { // for WP2.0					
+				} else { // for WP2.0
 					if ( !empty($_COOKIE[USER_COOKIE]) && !empty($_COOKIE[PASS_COOKIE])){
 						if(wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) {
@@ -51,25 +51,8 @@
 					}
 				}
-			}				
-			return xpress_login();	
+			}
+			return xpress_login();
 		} else {							// For the xoops guest
-		
-			if (function_exists('wp_validate_auth_cookie')){
-				if ( ! $user = wp_validate_auth_cookie() ) {
-					 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
-					 	wp_set_current_user(0);
-					 	return false;
-					 }
-				}
-				wp_set_current_user($user);
-			} else { // for WP2.0
-				if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) || 
-					!wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) {
-					wp_set_current_user(0);
-					return false;
-				}
-				$user_login = $_COOKIE[USER_COOKIE];
-				wp_set_current_user(0, $user_login);
-			}
+			wp_set_current_user(0);
 			return false;
 		}
@@ -91,5 +74,5 @@
 			wp_set_current_user($user);
 		} else { // for WP2.0
-			if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) || 
+			if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) ||
 				!wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) {
 				wp_set_current_user(0);
@@ -107,5 +90,5 @@
 	global $current_user;
 	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
-	
+
 	if(is_object($xoopsUser)){
 		$u_name = $xoopsUser->getVar("uname");
@@ -124,5 +107,5 @@
 					return  true;
 				}
-			}			
+			}
 		}
 	}
@@ -147,5 +130,5 @@
 			return false;
 	}
-					
+
 	if(is_object($GLOBALS["xoopsModule"])){
 //		&& WP_BLOG_DIRNAME == $GLOBALS["xoopsModule"]->getVar("dirname")){
@@ -162,5 +145,5 @@
 		$needle = '/modules/' . $mydirname . '/wp-admin/';
 		if (strstr($org_url , $needle)){
-			return true;				
+			return true;
 		}
 	}
@@ -176,15 +159,15 @@
 
 	// For attestation when password has been sent as hash value. (When having logged it in from Xoops and ImpressCMS)
-	if ($hash == $password){ 
+	if ($hash == $password){
 		return apply_filters('check_password', true, $password, $hash, $user_id);
 	}
-	
-	// Password authentication for Xoops 
+
+	// Password authentication for Xoops
 	if ( strlen($hash) <= 32 ) {
 		$check = ( $hash == md5($password) );
-		return apply_filters('check_password', $check, $password, $hash, $user_id);	
-	}
-	
-	// Password authentication for ImpressCMS 
+		return apply_filters('check_password', $check, $password, $hash, $user_id);
+	}
+
+	// Password authentication for ImpressCMS
 	if($xoops_config->is_impress && function_exists('hash')){
 		$mainSalt = $xoops_config->xoops_db_salt;
@@ -195,6 +178,6 @@
 		$user_salt = $xoops_db->get_var("SELECT salt FROM $xoops_user_db WHERE uname = '$login_name'");
 		$enc_type = intval( $xoops_db->get_var("SELECT enc_type FROM $xoops_user_db WHERE uname = '$login_name'") );
-		
-		// Make Impress hash 
+
+		// Make Impress hash
 		if($enc_type == 0) {$impress_hash = md5($password);} // no salt used for compatibility with external scripts such as ipb/phpbb etc.
 		elseif($enc_type == 1) {$impress_hash = hash('sha256', $user_salt.md5($password).$mainSalt);}
@@ -218,10 +201,10 @@
 			return apply_filters('check_password', true, $password, $hash, $user_id);
 		}
-	}	
+	}
 
 	// If the hash is still md5...
 	if ( strlen($hash) <= 32 ) {
-		$check = ( $hash == md5($password) );	
-/* A new hash is not used because it differs from the hash on the XOOPS password. 
+		$check = ( $hash == md5($password) );
+/* A new hash is not used because it differs from the hash on the XOOPS password.
  *		if ( $check && $user_id ) {
  *			// Rehash using new hash.
@@ -250,5 +233,5 @@
 function wp_redirect($location, $status = 302) {
 	global $is_IIS,$xoops_config,$action;
-	
+
 	if ($location == 'wp-login.php?loggedout=true') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at wp logout
 	if ($location == 'wp-login.php?action=register') $location = $xoops_config->xoops_url."/register.php";  //wp-register to xoops register
@@ -272,5 +255,5 @@
 			header("Location: $location");
 		}
-	} else {  // force redirect 
+	} else {  // force redirect
 		echo ("<HTML>");
 		echo("<META http-equiv=\"Refresh\" content=\"0;url=$location\">");
