Code to check if a customer is logged in Magento?

+2 votes
267 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 322 views
0 votes
1 answer 232 views
0 votes
1 answer 339 views
+1 vote
1 answer 427 views
0 votes
3 answers 300 views
0 votes
1 answer 247 views
...