diff --git a/public_html/storefront/controller/pages/account/create.php b/public_html/storefront/controller/pages/account/create.php
index 6b0821aec3..7dbeaba61c 100755
--- a/public_html/storefront/controller/pages/account/create.php
+++ b/public_html/storefront/controller/pages/account/create.php
@@ -41,7 +41,7 @@ public function main(){
if($this->csrftoken->isTokenValid()){
$this->errors = array_merge($this->errors, $this->model_account_customer->validateRegistrationData($request_data));
} else {
- $this->error['warning'] = $this->language->get('error_unknown');
+ $this->errors['warning'] = $this->language->get('error_unknown');
}
if (!$this->errors){
//if allow login as email, need to set loginname = email
@@ -56,9 +56,9 @@ public function main(){
if (!$this->config->get('config_customer_approval')){
//add and send account activation link if required
- if (!$this->config->get('config_customer_email_activation')){
+ if (!$this->config->get('config_customer_email_activation')){
//send welcome email
- $this->model_account_customer->sendWelcomeEmail($this->request->post['email'], true);
+ $this->model_account_customer->sendWelcomeEmail($this->request->post['email'], true);
//login customer after create account is approving and email activation are disabled in settings
$this->customer->login($request_data['loginname'], $request_data['password']);
} else{
@@ -171,6 +171,9 @@ public function main(){
if ($im_drivers){
foreach ($im_drivers as $protocol => $driver_obj){
+ /**
+ * @var AMailIM $driver_obj
+ */
if (!is_object($driver_obj) || $protocol=='email'){
continue;
}
@@ -221,8 +224,9 @@ public function main(){
$this->loadModel('localisation/country');
$countries = $this->model_localisation_country->getCountries();
+ $options = array();
if(count($countries) > 1) {
- $options = array ("FALSE" => $this->language->get('text_select'));
+ $options = array ("FALSE" => $this->language->get('text_select'));
}
foreach ($countries as $item){
$options[$item['country_id']] = $item['name'];
@@ -232,7 +236,9 @@ public function main(){
'type' => 'selectbox',
'name' => 'country_id',
'options' => $options,
- 'value' => (isset($this->request->post['country_id']) ? $this->request->post['country_id'] : $this->config->get('config_country_id')),
+ 'value' => (isset($this->request->post['country_id'])
+ ? $this->request->post['country_id']
+ : $this->config->get('config_country_id')),
'required' => true));
$this->data['form']['fields']['password']['password'] = $form->getFieldHtml(
@@ -252,7 +258,9 @@ public function main(){
array (
'type' => 'radio',
'name' => 'newsletter',
- 'value' => (!is_null($this->request->get_or_post('newsletter')) ? $this->request->get_or_post('newsletter') : -1),
+ 'value' => (!is_null($this->request->get_or_post('newsletter'))
+ ? $this->request->get_or_post('newsletter')
+ : -1),
'options' => array (
'1' => $this->language->get('text_yes'),
'0' => $this->language->get('text_no'),
@@ -268,7 +276,6 @@ public function main(){
'recaptcha_site_key' => $this->config->get('config_recaptcha_site_key'),
'language_code' => $this->language->getLanguageCode()
));
-
} else{
$this->data['form']['fields']['newsletter']['captcha'] = $form->getFieldHtml(
array (
@@ -278,7 +285,7 @@ public function main(){
}
}
- //TODO: REMOVE THIS IN 1.3!!!
+ //TODO: REMOVE THIS IN 2.0!!!
// backward compatibility code
$deprecated = $this->data['form']['fields'];
foreach($deprecated as $section=>$fields){
@@ -302,8 +309,9 @@ public function main(){
$this->data['form']['continue'] = $form->getFieldHtml(
array (
'type' => 'submit',
- 'name' => $this->language->get('button_continue')));
-
+ 'name' => $this->language->get('button_continue')
+ )
+ );
$this->data['error_warning'] = $this->errors['warning'];
$this->data['error_loginname'] = $this->errors['loginname'];
@@ -349,21 +357,17 @@ public function main(){
//init controller data
$this->extensions->hk_UpdateData($this, __FUNCTION__);
}
-
+
public function resend(){
//init controller data
$this->extensions->hk_InitData($this, __FUNCTION__);
-
$this->loadModel('account/customer');
- $enc = new AEncryption($this->config->get('encryption_key'));
+ $enc = new AEncryption($this->config->get('encryption_key'));
list($customer_id, $activation_code) = explode("::", $enc->decrypt($this->request->get['rid']));
if($customer_id && $activation_code) {
-
$this->model_account_customer->emailActivateLink($customer_id);
}
-
$this->extensions->hk_UpdateData($this, __FUNCTION__);
redirect($this->html->getSecureURL('account/success'));
- }
-
+ }
}
\ No newline at end of file