Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Customer can be login from out side the magento from Social Engine but not show logged in magento
 
rajendra_banker
Jr. Member
 
Total Posts:  1
Joined:  2009-05-10
 

Hello,

I have successfully login my custumer from out side magento but,
the problem is how to show that customer also logged in magento…
my code for login is as below

<?php
require_once ( $root."/magento/app/Mage.php" );
umask(0);

// Initialize Magento
Mage::app("default");

// You have two options here,
// "frontend" for frontend session or "adminhtml" for admin session
Mage::getSingleton("core/session", array("name" => "frontend"));

$session = Mage::getSingleton("customer/session");

if($session->isLoggedIn())
{
session_destroy();
//$user->user_logout();
//$session->logout($session->getCustomer());
print_r($_SESSION);
exit;
//Mage::run();
//header("Location:http://google.com");
} else {

if(isset($_POST['email']) && isset($_POST['password']))
{
$email=$_POST['email'];
$password=$_POST['password'];
}
$session->login($email, $password); //

$session->setCustomerAsLoggedIn($session->getCustomer());
$customer = $session->getCustomer();
?>
what should i do now?

kindly help me ASAP

thank
Rajendra Banker

 
Magento Community Magento Community
Magento Community
Magento Community
 
BBrizzio
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2008-05-19
salò, Brescia, Italy
 

Similar problem for me.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top