Magento SOAP Web服务->用户登录

| 我正在编写一个用于在移动设备和magento之间进行通信的Web服务,我正在使用Magento提供的SOAP Web服务,但是,我在用户身份验证时迷失了,我需要对我的系统用户(不是api用户)进行身份验证)。有什么线索吗?     
已邀请:
        您不能使用SOAP Api在magento中记录用户帐户,因为它不支持该功能,您必须以另一种方式来使用它,可能会覆盖Mage Customer中名为AccountController.php的控制器文件。 尝试添加一个可以通过JSON变量与服务器通信的新方法。     
        您可以使用REST api对客户进行身份验证。 http://www.magentocommerce.com/api/rest/introduction.html 这种方法似乎更方便,因为您可能会收到包含已登录客户已应用目录规则的产品列表(例如,由客户组应用)。 SOAP API不提供此类功能(您只能以admin用户身份接收产品列表)。     
        用这个
$mageFilename = \'app/Mage.php\';
require_once $mageFilename;
$app = Mage::app(\'default\'); 
Mage::app();
$user = \"snjha77@gmail.com\";
$pass = \"admin123\";
$session = Mage::getSingleton( \'customer/session\' );
    Mage::app()->getStore()->setWebsiteId(1);
    try
    {
        $session->login( $user, $pass);
        $customer = $session->getCustomer();
        //echo \"valid\";
        $userID = $session->getCustomer()->getId();
    $return_array[\'customer_id\'] = $userID;
        $return_array[\'status\'] = 1;
        $return_array[\'message\'] = \"Login is valid\";
        echo json_encode($return_array);
        } catch( Exception $e ) {
            $return_array[\'status\']= 0;
        $return_array[\'message\']=\"Login is invalid\";
        echo json_encode($return_array);
              }
    
        不,你不能那样做。如果可以通过FTP访问文件,则可以获取数据库配置文件的get_file_content,然后从外部源连接到数据库并执行用户访问检查。 申请风险自负。可能无效。但是您可以尝试!     

要回复问题请先登录注册