I call the observer i.e. customerRegisterSuccess function after successfull registration of customer.In this function I want to get email as well as telephone number of customer.Email successfully fetch by using function $observer->getEvent()->getCustomer()->getEmail(); But, While fetching telephone number I face too much problems.I use below some function but all are not in use.
function are :
All above function return NULL.Some function get error. So, please let me know the perfect answer.The telephone no. field present in the address information section of registration form.

3 Answers 3


Try this in your (Observer) file.

$customer = $observer->getEvent()->getCustomer();

Because telephone is an address attribute.

  • Sorry, but i can't figure out how can you get an address attribute value after registration... unless change the registration form in order to add an address form. Have you the customer address form in registration? Commented Dec 24, 2015 at 7:37
  • i am trying this code but it is not working in 1.9.2
    – inrsaurabh
    Commented May 1, 2017 at 12:52

Check With the Below implantation that you are doing the Rightway

Implementation Steps :

Step 1 : Create Required folders.

Create below folders in

app/code/local/Wli/Registrationdemo/etc, app/code/local/Wli/Registrationdemo/Model.

Wli is company name & Registration demo is module name. You can use your own company name & module name instead of above specified.

Step 2 : Activate Module through module xml file.

Magento requires xml file that tells to magento to look into it & call your custom module based on the xml. So lets create module xml file Wli_Registrationdemo.xml & place the file into the app/etc/modules directory.

<?xml version="1.0"?>

Step 3 : Create Configuration XML file.

Next step is to create module configuration file config.xml & place it in app/code/local/Wli/Registrationdemo/etc folder which we have created earlier.


Step 4 : Create Model Class (Observer) file.

class Wli_Registrationdemo_Model_Observer {
    public function customerRegisterSuccess(Varien_Event_Observer $observer) {
        $event = $observer->getEvent();
        $customer = $event->getCustomer();
        $email = $customer->getEmail();
        if($email) {
            //Create custom code over here as per your requirements !


  • I use the same procedure you have given.Now my problem is that I want telephone no. as well in customerRegisterSuccess function. I use $customer->getTelephone(); but its not fetch telephone no. here Commented Dec 24, 2015 at 6:16
  • Do you have phone number set as customer attribute ? Commented Dec 24, 2015 at 6:26

"Out of the box" Magento Customer Entity hasn't Telephone Attribute, you need to look for this attribute in the customer address entity, but at this point (customerRegisterSuccess) you don't have any address data because the customer must fill the telephone when set an address (not in registration) so you have two options:

  1. Create a Customer Attribute for telephone and set it as required, then you will get it in your observer.

  2. Change the observer to some other event like "customer_address_save_after" in order to get the telephone from the address object.

  • This is great solution.But it requires to add attribute or create new observer function.anyway thanks for the reply sir.. Commented Dec 24, 2015 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.