magento中管理员用户登录/注销的事件?
在magento中是否存在管理员用户登录和注销事件 我发现了一些用于客户登录但不用于管理员用户登录的事件magento中管理员用户登录/注销的事件?,magento,events,zend-framework,observers,adminhtml,Magento,Events,Zend Framework,Observers,Adminhtml,在magento中是否存在管理员用户登录和注销事件 我发现了一些用于客户登录但不用于管理员用户登录的事件 <events> <customer_login> <observers> <scommerce_customer_login><!--User Defined Unique Name--> <class>scommer
<events>
<customer_login>
<observers>
<scommerce_customer_login><!--User Defined Unique Name-->
<class>scommerce_login/observer</class>
<method>checkLoginStatus</method>
</scommerce_customer_login>
</observers>
</customer_login>
</events>
scommerce\u登录/观察者
检查登录状态
如何获取管理员用户登录事件?如果您临时编辑Mage_Core_Model_App::dispatchEvent以记录传入的$eventName,则可以记录已调度的每个事件的列表。(请注意,对于某些操作,这可能会由于触发大量事件而导致错误,因此请确保删除日志记录,并避免在生产环境中执行此操作)
使用此方法,我看到
管理会话\u用户\u登录\u成功
,这似乎很有希望。对于注销,似乎唯一相关的是controller\u action\u predispatch\u adminhtml\u index\u logout
和controller\u action\u postspatch\u adminhtml\u index\u logout
,这可能是或可能不是足够可靠的指标 这正按预期工作
<events>
<admin_session_user_login_success>
<observers>
<Ss_Supportticket_model_observer>
<!-- The model to be instantiated -->
<class>Ss_Supportticket_model_observer</class>
<!-- The method of the class to be called -->
<method>saveUserLoginSession</method>
<!-- The type of class to instantiate -->
<type>singleton</type>
</Ss_Supportticket_model_observer>
</observers>
</admin_session_user_login_success>
<!-- <controller_action_predispatch> -->
<controller_action_predispatch_adminhtml_index_logout>
<observers>
<Ss_Supportticket_model_observer>
<!-- The model to be instantiated -->
<class>Ss_Supportticket_model_observer</class>
<!-- The method of the class to be called -->
<method>saveUserLogoutSession</method>
<!-- The type of class to instantiate -->
<type>singleton</type>
</Ss_Supportticket_model_observer>
</observers>
</controller_action_predispatch_adminhtml_index_logout>
<!-- </controller_action_predispatch> -->
</events>
Ss_支持票_模型_观察员
saveUserLoginSession
独生子女
Ss_支持票_模型_观察员
saveUserLogoutSession
独生子女
好吧,你被困在
admin_session_user_login_success
admin_session_user_login_failed
用于捕获管理员登录