This is my php file which I am calling using ajax function call. For test purpose I also tried it calling directly.
include "/srv/www/htdocs/magento/app/Mage.php";
Mage::init();
if(Mage::getSingleton('customer/session')->isLoggedIn())
{
echo 'Logged In';
}
else
{
echo 'Not Logged In';
}
The code do not give any errors. I checked in apache error log.
The magento 1.6.1 version I am using failes to check if user is logged in or not.
I tried to execute this code while the user is logged in and also when the user is NOT logged in.
But this code output only the else statement that is “Nog logged in”
Help please
Do check if this helps!
for more details check here Magento Customer login