Я полагаю, что этот код выполняется до того, как данные объекта клиента были сохранены с перезаписью.
В OnePageCheckout есть строка кода:
/**
* Involve new customer to system
*
* @return Mage_Checkout_Model_Type_Onepage
*/
protected function _involveNewCustomer()
{
$customer = $this->getQuote()->getCustomer();
if ($customer->isConfirmationRequired()) {
$customer->sendNewAccountEmail('confirmation', '', $this->getQuote()->getStoreId());
$url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail());
$this->getCustomerSession()->addSuccess(
Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please <a href="%s">click here</a>.', $url)
);
} else {
$customer->sendNewAccountEmail('registered', '', $this->getQuote()->getStoreId());
$this->getCustomerSession()->loginById($customer->getId());
}
return $this;
}
Если клиент просто регистрируется, не используя процесс оформления заказа, то есть другая функция, использующая параметры запроса, как сказал Антон:
/ app / code / core / Mage / Customer / Block / Form / Register.php
/**
* Restore entity data from session
* Entity and form code must be defined for the form
*
* @param Mage_Customer_Model_Form $form
* @return Mage_Customer_Block_Form_Register
*/
public function restoreSessionData(Mage_Customer_Model_Form $form, $scope = null)
{
if ($this->getFormData()->getCustomerData()) {
$request = $form->prepareRequest($this->getFormData()->getData());
$data = $form->extractData($request, $scope, false);
$form->restoreData($data);
}
return $this;
}