Skip to main content
    <?xml version="1.0" encoding="UTF-8"?>

    <config>
        <modules>
            <Bmg_Golo>
                <version>0.0.1</version>
            </Bmg_Golo>
        </modules>
        <global>
            <models>
                <bmg_golo>
                    <class>Bmg_Golo_Model</class>
                </bmg_golo>
            </models>
        </global>
        <frontend>
            <events>
                <controller_action_postdispatch_customer_account_resetpasswordpost> 
                    <observers>
                        <bmg_golo>
                            <class>bmg_golo<type>singleton</observer<type>
                            <class>Bmg_Golo_Model_Observer</class>
                            <method>logout</method>
                        </bmg_golo>
                    </observers>
                </controller_action_postdispatch_customer_account_resetpasswordpost>
            </events>
        </frontend>
    </config>
    <?xml version="1.0" encoding="UTF-8"?>

    <config>
        <modules>
            <Bmg_Golo>
                <version>0.0.1</version>
            </Bmg_Golo>
        </modules>
        <global>
            <models>
                <bmg_golo>
                    <class>Bmg_Golo_Model</class>
                </bmg_golo>
            </models>
        </global>
        <frontend>
            <events>
                <controller_action_postdispatch_customer_account_resetpasswordpost> 
                    <observers>
                        <bmg_golo>
                            <class>bmg_golo/observer</class>
                            <method>logout</method>
                        </bmg_golo>
                    </observers>
                </controller_action_postdispatch_customer_account_resetpasswordpost>
            </events>
        </frontend>
    </config>
    <?xml version="1.0" encoding="UTF-8"?>

    <config>
        <modules>
            <Bmg_Golo>
                <version>0.0.1</version>
            </Bmg_Golo>
        </modules>
        <global>
            <models>
                <bmg_golo>
                    <class>Bmg_Golo_Model</class>
                </bmg_golo>
            </models>
        </global>
        <frontend>
            <events>
                <controller_action_postdispatch_customer_account_resetpasswordpost> 
                    <observers>
                        <bmg_golo>
                            <type>singleton</type>
                            <class>Bmg_Golo_Model_Observer</class>
                            <method>logout</method>
                        </bmg_golo>
                    </observers>
                </controller_action_postdispatch_customer_account_resetpasswordpost>
            </events>
        </frontend>
    </config>
  1. I registered my extension at app/etc/modules/Bmg_Golo.xml:

     <?xml version="1.0" encoding="UTF-8"?>
     <config>
         <modules>
             <Bmg_Golo>local</Bmg_Golo>
             <active>true</active>
         </modules>
     </config>
    
  2. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml:

     <?xml version="1.0" encoding="UTF-8"?>
    
     <config>
         <modules>
             <Bmg_Golo>
                 <version>0.0.1</version>
             </Bmg_Golo>
         </modules>
         <global>
             <models>
                 <bmg_golo>
                     <class>Bmg_Golo_Model</class>
                 </bmg_golo>
             </models>
         </global>
         <frontend>
             <events>
                 <controller_action_postdispatch_customer_account_resetpasswordpost> 
                     <observers>
                         <bmg_golo>
                             <class>bmg_golo/observer</class>
                             <method>logout</method>
                         </bmg_golo>
                     </observers>
                 </controller_action_postdispatch_customer_account_resetpasswordpost>
             </events>
         </frontend>
     </config>
    
  3. I created an observer at app/code/local/Bmg/Golo/module/Observer.php:

     <?php
     /**
     * 
     */
     class Bmg_Golo_Model_Observer
     {
         public function logout($observer) {
             $session = Mage::getSingleton('customer/session');
                 if ($session->isLoggedIn()) {
                     Mage::getSingleton('customer/session')->logout();
                 }
         }
    
     }
     ?>
    
    I registered my extension.

app/etc/modules/Bmg_Golo.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
        <modules>
            <Bmg_Golo>local</Bmg_Golo>
            <active>true</active>
        </modules>
    </config>
  1. My config.xml

app/code/local/Bmg/Golo/etc/config.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <config>
        <modules>
            <Bmg_Golo>
                <version>0.0.1</version>
            </Bmg_Golo>
        </modules>
        <global>
            <models>
                <bmg_golo>
                    <class>Bmg_Golo_Model</class>
                </bmg_golo>
            </models>
        </global>
        <frontend>
            <events>
                <controller_action_postdispatch_customer_account_resetpasswordpost> 
                    <observers>
                        <bmg_golo>
                            <class>bmg_golo/observer</class>
                            <method>logout</method>
                        </bmg_golo>
                    </observers>
                </controller_action_postdispatch_customer_account_resetpasswordpost>
            </events>
        </frontend>
    </config>
  1. I created an observer.

app/code/local/Bmg/Golo/module/Observer.php

    <?php
    /**
    * 
    */
    class Bmg_Golo_Model_Observer
    {
        public function logout($observer) {
            $session = Mage::getSingleton('customer/session');
                if ($session->isLoggedIn()) {
                    Mage::getSingleton('customer/session')->logout();
                }
        }
    
    }
    ?>
  1. I registered my extension at app/etc/modules/Bmg_Golo.xml:

     <?xml version="1.0" encoding="UTF-8"?>
     <config>
         <modules>
             <Bmg_Golo>local</Bmg_Golo>
             <active>true</active>
         </modules>
     </config>
    
  2. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml:

     <?xml version="1.0" encoding="UTF-8"?>
    
     <config>
         <modules>
             <Bmg_Golo>
                 <version>0.0.1</version>
             </Bmg_Golo>
         </modules>
         <global>
             <models>
                 <bmg_golo>
                     <class>Bmg_Golo_Model</class>
                 </bmg_golo>
             </models>
         </global>
         <frontend>
             <events>
                 <controller_action_postdispatch_customer_account_resetpasswordpost> 
                     <observers>
                         <bmg_golo>
                             <class>bmg_golo/observer</class>
                             <method>logout</method>
                         </bmg_golo>
                     </observers>
                 </controller_action_postdispatch_customer_account_resetpasswordpost>
             </events>
         </frontend>
     </config>
    
  3. I created an observer at app/code/local/Bmg/Golo/module/Observer.php:

     <?php
     /**
     * 
     */
     class Bmg_Golo_Model_Observer
     {
         public function logout($observer) {
             $session = Mage::getSingleton('customer/session');
                 if ($session->isLoggedIn()) {
                     Mage::getSingleton('customer/session')->logout();
                 }
         }
    
     }
     ?>
    
  1. I registered my extension.

app/etc/modules/Bmg_Golo.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
        <modules>
            <Bmg_Golo>local</Bmg_Golo>
            <active>true</active>
        </modules>
    </config>
  1. My config.xml

app/code/local/Bmg/Golo/etc/config.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <config>
        <modules>
            <Bmg_Golo>
                <version>0.0.1</version>
            </Bmg_Golo>
        </modules>
        <global>
            <models>
                <bmg_golo>
                    <class>Bmg_Golo_Model</class>
                </bmg_golo>
            </models>
        </global>
        <frontend>
            <events>
                <controller_action_postdispatch_customer_account_resetpasswordpost> 
                    <observers>
                        <bmg_golo>
                            <class>bmg_golo/observer</class>
                            <method>logout</method>
                        </bmg_golo>
                    </observers>
                </controller_action_postdispatch_customer_account_resetpasswordpost>
            </events>
        </frontend>
    </config>
  1. I created an observer.

app/code/local/Bmg/Golo/module/Observer.php

    <?php
    /**
    * 
    */
    class Bmg_Golo_Model_Observer
    {
        public function logout($observer) {
            $session = Mage::getSingleton('customer/session');
                if ($session->isLoggedIn()) {
                    Mage::getSingleton('customer/session')->logout();
                }
        }
    
    }
    ?>

I am doing this in Magento 1.9 CE. So, and my objective is to log out the user as soon as the password is changed.

  1. I registered my extension at app/etc/modules/Bmg_Golo.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>local</Bmg_Golo>
        <active>true</active>
    </modules>
</config>
  1. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>
            <version>0.0.1</version>
        </Bmg_Golo>
    </modules>
    <global>
        <models>
            <bmg_golo>
                <class>Bmg_Golo_Model</class>
            </bmg_golo>
        </models>
    </global>
    <frontend>
        <events>
    <controller_action_postdispatch_customer_account_resetpasswordpost> 
                <observers>
                    <bmg_golo>
                        <class>bmg_golo/observer</class>
                        <method>logout</method>
                    </bmg_golo>
                </observers>
    </controller_action_postdispatch_customer_account_resetpasswordpost>
        </events>
    </frontend>
</config>
  1. I created an observer at app/code/local/Bmg/Golo/module/Observer.php
<?php
class Bmg_Golo_Model_Observer
{
    public function logout($observer) {
        $session = Mage::getSingleton('customer/session');
            if ($session->isLoggedIn()) {
                Mage::getSingleton('customer/session')->logout();
            }
    }

}
?>
  1. I registered my extension at app/etc/modules/Bmg_Golo.xml:

     <?xml version="1.0" encoding="UTF-8"?>
     <config>
         <modules>
             <Bmg_Golo>local</Bmg_Golo>
             <active>true</active>
         </modules>
     </config>
    
  2. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml:

     <?xml version="1.0" encoding="UTF-8"?>
    
     <config>
         <modules>
             <Bmg_Golo>
                 <version>0.0.1</version>
             </Bmg_Golo>
         </modules>
         <global>
             <models>
                 <bmg_golo>
                     <class>Bmg_Golo_Model</class>
                 </bmg_golo>
             </models>
         </global>
         <frontend>
             <events>
                 <controller_action_postdispatch_customer_account_resetpasswordpost> 
                     <observers>
                         <bmg_golo>
                             <class>bmg_golo/observer</class>
                             <method>logout</method>
                         </bmg_golo>
                     </observers>
                 </controller_action_postdispatch_customer_account_resetpasswordpost>
             </events>
         </frontend>
     </config>
    
  3. I created an observer at app/code/local/Bmg/Golo/module/Observer.php:

     <?php
     /**
     * 
     */
     class Bmg_Golo_Model_Observer
     {
         public function logout($observer) {
             $session = Mage::getSingleton('customer/session');
                 if ($session->isLoggedIn()) {
                     Mage::getSingleton('customer/session')->logout();
                 }
         }
    
     }
     ?>
    

My customer logged out after changing the password. I doubt the event/observer in the config is wrong and my method in the observer is not getting called. Please help me as I am new to magentoMagento.

I am doing this in Magento 1.9 CE. So my objective is to log out the user as soon as the password is changed.

  1. I registered my extension at app/etc/modules/Bmg_Golo.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>local</Bmg_Golo>
        <active>true</active>
    </modules>
</config>
  1. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>
            <version>0.0.1</version>
        </Bmg_Golo>
    </modules>
    <global>
        <models>
            <bmg_golo>
                <class>Bmg_Golo_Model</class>
            </bmg_golo>
        </models>
    </global>
    <frontend>
        <events>
    <controller_action_postdispatch_customer_account_resetpasswordpost> 
                <observers>
                    <bmg_golo>
                        <class>bmg_golo/observer</class>
                        <method>logout</method>
                    </bmg_golo>
                </observers>
    </controller_action_postdispatch_customer_account_resetpasswordpost>
        </events>
    </frontend>
</config>
  1. I created an observer at app/code/local/Bmg/Golo/module/Observer.php
<?php
class Bmg_Golo_Model_Observer
{
    public function logout($observer) {
        $session = Mage::getSingleton('customer/session');
            if ($session->isLoggedIn()) {
                Mage::getSingleton('customer/session')->logout();
            }
    }

}
?>

My customer logged out after changing the password. I doubt the event/observer in the config is wrong and my method in the observer is not getting called. Please help me as I am new to magento.

I am doing this in Magento 1.9 CE, and my objective is to log out the user as soon as the password is changed.

  1. I registered my extension at app/etc/modules/Bmg_Golo.xml:

     <?xml version="1.0" encoding="UTF-8"?>
     <config>
         <modules>
             <Bmg_Golo>local</Bmg_Golo>
             <active>true</active>
         </modules>
     </config>
    
  2. My config.xml is at app/code/local/Bmg/Golo/etc/config.xml:

     <?xml version="1.0" encoding="UTF-8"?>
    
     <config>
         <modules>
             <Bmg_Golo>
                 <version>0.0.1</version>
             </Bmg_Golo>
         </modules>
         <global>
             <models>
                 <bmg_golo>
                     <class>Bmg_Golo_Model</class>
                 </bmg_golo>
             </models>
         </global>
         <frontend>
             <events>
                 <controller_action_postdispatch_customer_account_resetpasswordpost> 
                     <observers>
                         <bmg_golo>
                             <class>bmg_golo/observer</class>
                             <method>logout</method>
                         </bmg_golo>
                     </observers>
                 </controller_action_postdispatch_customer_account_resetpasswordpost>
             </events>
         </frontend>
     </config>
    
  3. I created an observer at app/code/local/Bmg/Golo/module/Observer.php:

     <?php
     /**
     * 
     */
     class Bmg_Golo_Model_Observer
     {
         public function logout($observer) {
             $session = Mage::getSingleton('customer/session');
                 if ($session->isLoggedIn()) {
                     Mage::getSingleton('customer/session')->logout();
                 }
         }
    
     }
     ?>
    

My customer logged out after changing the password. I doubt the event/observer in config is wrong and my method in the observer is not getting called. Please help me as I am new to Magento.

formatting
Source Link
Mohit Kumar Arora
  • 10.2k
  • 7
  • 28
  • 56
Loading
Source Link
Loading