magentoeventszend-frameworkobserversadminhtml

Events for admin user login/logout in magento?


Is there any events for admin user login and logout in magento?

I found some events for customer login but not for Admin user login

<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>

For how to get the admin users login events?


Solution

  • This is working as expected

    <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>