我有一个 Magento 网站。有管理员用户,那就是我和其他用户。如何查看其他用户是否已登录(后端)?
编辑
感谢 Sandeep,我现在有了这个:
<?php
$session = Mage::getSingleton('admin/session');
$userDetails = Mage::getSingleton('admin/session');
// Get data from the session $userID =
$userDetails->getUser()->getUserId();
// Get user ID $userID =
$userDetails->getUser()->getEmail();
// Use the 'admin/session' object to check loggedIn status
if ( $session->isLoggedIn() ) {
echo "Ingelogd";
} else {
echo "Niet ingelogt";
}
?>