johnson johnson - 2 years ago 216
PHP Question

Magento soap call customer auto login from php

I have created a magento soap login i need to do customer auto login after completed the registration process....

need to login outside of magento

Can any one please help me?...

Answer Source
require_once MAGE_BASE_DIR."/app/Mage.php";

Mage::getSingleton("core/session", array("name" => "frontend"));
$session = Mage::getSingleton("customer/session");

try {
    $login = $session->login($username,$password);
    if ($session->isLoggedIn()) {
        echo "Successfully Logged in";
    } else {
        echo "Not Logged in";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download