Authenticating customer outside Magento

November 19th, 2009 by Ritesh Gurung

In a recent project we faced a challange to authenticate user through asp. We needed only to authenticate user and not log him into the Magento store site.
After googling through the net I found this link http://www.magentocommerce.com/boards/viewthread/36143/#t119542
<?php
/**
* Magento validation starts here
*/
require_once (dirname(dirname(realpath(__FILE__))).’/app/Mage.php’);
umask(0);
Mage::app();
//Mage::getSingleton(’core/session’, array(’name’=>’frontend’));
$session = Mage::getSingleton(’customer/session’);
try{
$session->login($_REQUEST['login']['username'],$_REQUEST['login']['password']);
$session->setCustomerAsLoggedIn($session->getCustomer());
//Load the customer modules
$customer = Mage::getModel(’customer/customer’)
->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
//Get customer attribbutes
$customer->loadByEmail($_REQUEST['login']['username']);
/**
* Do the stuff [...]

Tech session (07Nov2009) Follow-up

November 19th, 2009 by Raj Oruganti

The tech session we had on the 7th of November could be classified as a reasonable success, considering the number of people who attended and the range of topics that were discussed. Apart from the scheduled topics on SASS and CMS migration we also discussed the use of Ubercart to implement e-commerce applications easily and [...]

 Subscribe to our Blog feed