Code to check if a customer is logged in Magento?

+2 votes
292 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 353 views
0 votes
1 answer 365 views
0 votes
1 answer 437 views
+1 vote
1 answer 454 views
0 votes
3 answers 399 views
0 votes
1 answer 260 views
...