How to Redirect Users after Successful Login in WordPress without using and plugin It’s a very common situation when you providing login to your user in WordPress Site. When any…
login | W3REIGN
Read More
How to Create Front-end login form in WordPress without using any plugin This is the easiest way to creating a simple front-end login form in WordPress, without using a plugin…
Checking admin is logged in or not in Magento You can check easily the admin is loged in or not by this simple code snippets.
1 2 3 4 5 6 7 8 9 |
$adminsession = Mage::getSingleton('admin/session', array('name'=>'adminhtml')); if($adminsession->isLoggedIn()) { echo "Admin is logged in"; } else { echo "Admin is Not logged in"; } |
Check customer is logged in or not in Magento You can check easily the customer is loged in or not by this simple code snippets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$session=Mage::getSingleton('customer/session', array('name'=>'frontend') ); if ($session->isLoggedIn()) { echo "customer is logged in"; } else { echo "Customer is Not logged in"; } //Another Way to Do this : if ($this->helper('customer')->isLoggedIn() ) { echo "customer is logged in"; } else { echo "customer is Not logged in"; } |