1

我有一个 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";
    }
?>
4

1 回答 1

-1
$session = Mage::getSingleton('admin/session');

// Use the 'admin/session' object to check loggedIn status
if ( $session->isLoggedIn() ) {
   echo "logged in";
} else {
   echo "not logged in";
}
于 2013-04-25T13:52:24.923 回答