Is there an event for customer account registration in Magento?

I would like to be able to run some functionality with a module that I am building whenever a customer registers an account, but I can't seem to find any event that is fired upon a new customer registration.

Does anybody know of an event that is dispatched for that?


Whenever I'm looking for an event, I'll temporarily edit the Mage.php file to output all the events for a particular request.

File: app/Mage.php
public static function dispatchEvent($name, array $data = array())
    Mage::log('Event: ' . $name); //not using Mage::log, as 
    //file_put_contents('/tmp/test.log','Dispatching '. $name. "\n",FILE_APPEND); //poor man's log
    Varien_Profiler::start('DISPATCH EVENT:'.$name);
    $result = self::app()->dispatchEvent($name, $data);
    #$result = self::registry('events')->dispatch($name, $data);
    Varien_Profiler::stop('DISPATCH EVENT:'.$name);
    return $result;

and then perform whatever action it is I'm trying to hook into. Magento events are logically named, so scanning/sorting through the resulting logs usually reveals what I'm after.

customer_register_success is what you are looking for:


I discovered how to achieve this today. It involves using one of the generic controller events. This node in the config.xml will hook into the right event:


The controller_action_postdispatch_REQUESTPATH event is thrown for every controller that extends Mage_Core_Controller_Front_Action (which is basically all of them) which makes it very easy to target. Ditto for controller_action_predispatch_REQUESTPATH.

I'm a bit surprised that none of the answers if solving the case completely.

Customer create can happen

  1. by url customer/account/create
  2. by register in checkout

I solved it by tracking two events:



and in Observer.php

public function createAccount($observer) { ... } //Nothing special here

public function createAccountCheckout($observer) {
    if ($observer->getQuote()->getData('checkout_method') != Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER) {

Edit: I changed




because on predispatch the account is not created yet. There can be an error for example if the email already exists in the shop.

There isn't a direct event for this, but you could use the customer_save_commit_after event. This event also guarantees you that the customer is save in the shop's database. The problem with this event is that is triggered twice. Bellow is an hack that allows you to use this event - the observer function is listed:

public function customer_save_commit_after($p_oObserver) {

    $l_oCustomer = $p_oObserver->getCustomer();

    if ($l_oCustomer->isObjectNew() && !$l_oCustomer->getMyCustomKeyForIsAlreadyProcessed()) {
        // new customer
    else {
        // existing customer

    return false;


Hope this helps someone!

You have to consider also when the user register on-the-fly on checkout: a Register on chekout. Thinking on this case, you can catch the "checkout_type_onepage_save_order_after" event with your own Observer class, and then this code...

if($observer->getEvent()->getQuote()->getCheckoutMethod(true) == Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER){

Anybody may say: Mage_Sales_Model_Quote->getCheckoutMethod() is deprecated since 1.4!!,but:

  • If we call the ortodox method Mage_Checkout_Model_Type_Onepage->getCheckoutMethod(), waiting for something as "METHOD_REGISTER" this is executed:

    if ($this->getCustomerSession()->isLoggedIn()) {
                return self::METHOD_CUSTOMER;

    ... "METHOD_CUSTOMER" is the name for a checkout with an already registrated user, not our case.... but yes!, because....

  • ...the registration operation is perfomed before "checkout_type_onepage_save_order_after" event. Then we a have a METHOD_CUSTOMER now. Ups, something inconsistent?

  • Fortunatly, the Quote remains with the original value: CHECKOUT_METHOD_REGISTER

    Any other idea for the registration on checkout?

    You can try customer_save_after, the only thing that the registration sends this event twice

    Actually there are customer_save_after and customer_save_before (magento 1.5)

    If you want to modify on-the-fly some data after form post, pick customer_save_before, change the data you want and that's all (the save action come after, so your change will be taken into account).

    $customer->save() just doesn't work in customer_save_after. (fatal error) Use this observer to run a code after customer creation which are NOT related to customer data.

    Hope that helps!



    these two are the default events when a customer is inserted into the database.... first event fires in frontend when a user registers and second event fires in the backend when a customer is created through admin panel...i hope you know how to register an observer for an event...hope this will help you...

    I was looking of the same thing. I believe the event is customer_register_success.

    You can find a link for all events at:

    I found the event checkout_submit_all_after.


    In my Observer.php I get the quote object that is passed in.

    public function customerRegistered (Varien_Event_Observer $observer) {
        $quote = $observer->getQuote();
        $checkout_method = $quote->getData();
        $checkout_method = $checkout_method['checkout_method'];                      
        if ($checkout_method == Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER) {        

    Do not use $quote->getCheckoutMethod() it gives you login_in instead. Not sure why. Hope this helps.

    I've discovered that the customer_login and customer_session_init events are both thrown on account create. You could register a listener for either and then check to see the create date on the account?

    The answer to this question is that there isn't an event for that.

    You can use the customer_register_success event. It is triggered after the customer is succesfully created. Here is the link of event cheat sheets. Hope it also helps you.

    customer_register_success is the event dispatched after successful customer registration. Here's from the code from Mage/Customer/controllers/AccountController.php::454 in magento 1.8:

    protected function _dispatchRegisterSuccess($customer)
            array('account_controller' => $this, 'customer' => $customer)

    customer_save_after is the event which gets called after a new customer registration.

    Read about all the events here:

    event name:customer_registration_is_allowed

    I'm not sure if this is you want,you can write a observer to test

    Need Your Help

    jquery: get value of custom attribute

    jquery custom-attributes attr

    html5 supports the placeholder attribute on input[type=text] elements, but I need to handle non-compliant browsers. I know there are a thousand plugins out there for placeholder but I'd like to cre...