I’m trying to create a script then trigger it from time to time to check “who” is logged in in admin (users), so I created this:
include 'app/Mage.php'; umask(0); Mage::app('admin'); echo '<div style="margin-right: 30px;padding: 10px;background: #fafafa;position:initial;float:right;"><pre>ORDER STATUSES<table>'; $ statuses = Mage::getModel('sales/order_status')->getResourceCollection()->getData(); foreach($ statuses as $ value){ echo '<tr><td>'.$ value['label']. ' </td><td>=></td><td>'.$ value['status'].'</td></tr>';} echo '</table></div>'; $ adminUser = Mage::getModel('admin/user'); $ users = $ adminUser->getCollection() $ users->getData(); echo '<pre>'; Mage::getSingleton('core/session', array('name'=>'robert')); $ session = Mage::getSingleton('admin/session'); if ($ session->isLoggedIn()) { echo $ session." is logged in"; } else { echo $ session." is NOT logged in"; } echo '</pre>';
But it won’t actually do it