protected function _logAdminAction($username, $userId, $details)
{
$eventCode = 'catalog_products';
//可用的event code 参见后台Admin Actions Log中Aciton Group下拉框的值
if (!Mage::getSingleton('enterprise_logging/config')->isActive($eventCode, true)) {
return;
}
return Mage::getSingleton('enterprise_logging/event')->setData(array(
'ip' => Mage::helper('core/http')->getRemoteAddr(),
'user' => $username,
'user_id' => $userId,
'is_success' => true,
'fullaction' => "adminhtml_catalog_product_save",
'event_code' => $eventCode,
'action' => 'save',
'info' =>$details,
))->save();
}
Magento为后台用户保存操作日志(企业版)
最新推荐文章于 2025-11-17 15:50:33 发布
本文介绍了一个Magento系统的受保护函数,该函数用于记录管理员在保存产品时的操作日志,包括用户信息、IP地址及详细操作等。
934

被折叠的 条评论
为什么被折叠?



