I am checking in my custom controller if customer is logged in or not if the customer clicks on register after registration it should redirect to my custom controller and continue the process. I am using customer_register_success it is executing but i am getting blank customer session in my custom function.Suggest me some solution. This my custom function

 public function getcustomerdata()
                     $customerData = Mage::getSingleton('customer/session')->getCustomer();
                      echo $customerData->getId();
                       $name = $customerData->getFirstname();

            return $name;


My observer function is.

 public function doSomething($observer)
       $AccountController = $observer->getEvent()->getAccountController();
        $Customer = $observer->getEvent()->getCustomer();

if (!$Customer->getCustomerActivated()) {
   $response1 = Mage::app()->getResponse(); // observers have event args

    $dataarray = Mage::getSingleton("mymodule/session")->getData_array();




You can use event to call your function after registration


public function yourMethod($observer)
    $customer = $observer->getCustomer();
|improve this answer|||||
  • thanks for your answer I have used this observer but I am getting blank session inside my custom function. – zest Aug 31 '16 at 5:58
  • Please post your code which you are using to get session. – Ashish Jagnani Aug 31 '16 at 6:02
  • Please check my update question. – zest Aug 31 '16 at 6:07
  • Try with improved answer. – Ashish Jagnani Aug 31 '16 at 6:16
  • check my updated question – zest Aug 31 '16 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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