我在Google& StackOverflow但仍未获得客户从另一台服务器登录以创建会话的代码或建议。
我使用了这段代码,但它无效:
$session = Mage::getSingleton( 'customer/session' );
Mage::app()->getStore()->setWebsiteId(1);
try {
$session->login( $email, $password );
$customer = $session->getCustomer();
return json_encode(array('status' => 'OK', 'userData' => $this->info($customer->getId())));
}
catch( Exception $e ) {
return json_encode(array('status' => 'error', 'message' => $e->getMessage()));
}