I am new in Magento
. Using Magento 1.9.2
version i create test.php
file in Magento
root i which write the code
include 'app/Mage.php';
Mage::app('default');
$customerName = Mage::helper('customer')->isLoggedIn();
var_dump($customerName);exit;
It always returning me false while i have logged in one customer in new tab. I just want to get data current logged in customer. It giving me null please help me sort out that problem.
Best Answer
You should use session for check is someone logged.
You can change 'name' to admin if you want check is someone logged into admin.
Solution found here:
https://stackoverflow.com/questions/13723166/magento-can-not-detect-if-customer-is-logged-in-or-not