first please pardon me if my question seems a bit off but I will appreciate if someone can point me to the right direction or a sample or code that can get all currently logged in customers online programmatically.
I already found out that you can use
Mage::getSingleton( 'customer/session' )->isLoggedIn()
if I understand you correctly, you want to know every customers currently logged in, this code (from
Mage_Adminhtml_Block_Customer_Online_Grid) should do it:
$collection = Mage::getModel('log/visitor_online') ->prepare() ->getCollection(); /* @var $collection Mage_Log_Model_Mysql4_Visitor_Online_Collection */ $collection->addFieldToFilter('customer_id', array('notnull' => true))->addCustomerData();
If you want to check about a particular user, replace
array('notnull' => true) by the id of this customer and check if the
count() of the collection is 1.