Create user
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($create['email']);
if(!$customer->getId())
{
$customer->setEmail($create['email']);
$customer->setFirstname($create['firstname']);
$customer->setLastname($create['lastname']);
$customer->setPassword($create['password']);
$customer->save();
$customer->setConfirmation(null);
$customer->save();
$customer->sendNewAccountEmail();
$session->login($create['email'], $create['password']);
}
Login user
$session->login($login['username'], $login['password']);
Forget password
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($forget['email']);
if($customer->getId())
{
$customer->sendPasswordReminderEmail();
}
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($create['email']);
if(!$customer->getId())
{
$customer->setEmail($create['email']);
$customer->setFirstname($create['firstname']);
$customer->setLastname($create['lastname']);
$customer->setPassword($create['password']);
$customer->save();
$customer->setConfirmation(null);
$customer->save();
$customer->sendNewAccountEmail();
$session->login($create['email'], $create['password']);
}
Login user
$session->login($login['username'], $login['password']);
Forget password
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($forget['email']);
if($customer->getId())
{
$customer->sendPasswordReminderEmail();
}
gfd
ReplyDelete