There are too many ways to identify is user logged in or not in magento.
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()){ $customerData=Mage::getSingleton('customer/session')->getCustomer(); echo "<pre>" print_r($customerData->getData()); // }else{ //not logged in } ?>
We can check user logged in or not in outside magento.
require_once 'app/Mage.php'; // Magento Mage.php path umask(0); Mage::app('default'); Mage::getSingleton('core/session', array('name' => 'frontend')); $user = Mage::getSingleton("customer/session"); if($user->isLoggedIn()) { echo "Logged"; } else { echo "Not Logged"; }
// Through helper to <strong>check the user login or not in magento</strong> file. <?php if ($this->helper('customer')->isLoggedIn()): ?>