Code to check if a customer is logged in Magento?

+2 votes
446 views
asked Jun 15, 2016 in Magento by Nicol Raulf
How can we check if customer is actually logged in on magento? Have googled a bit without luck :(

There should be someway found already for this.

Would be great if anyone can help me on this please?

Thanks in advance...

1 Answer

0 votes
answered Jun 15, 2016 by Danni Lonn
<?php 
$logged_in = Mage::getSingleton('customer/session')->isLoggedIn(); // (boolean) 
?>

Related questions

0 votes
1 answer 504 views
0 votes
2 answers 1648 views
0 votes
1 answer 643 views
+1 vote
1 answer 593 views
0 votes
3 answers 801 views
0 votes
1 answer 390 views
...