diff --git a/controllers/admin/AdminCustomerPreferencesController.php b/controllers/admin/AdminCustomerPreferencesController.php
index 07e7393dd..497f69314 100644
--- a/controllers/admin/AdminCustomerPreferencesController.php
+++ b/controllers/admin/AdminCustomerPreferencesController.php
@@ -72,6 +72,14 @@ class AdminCustomerPreferencesControllerCore extends AdminController
'cast' => 'intval',
'type' => 'bool'
),
+ 'PS_CUSTOMER_CREATION_EMAIL' => array(
+ 'title' => $this->l('Send an email after registration'),
+ 'desc' => $this->l('Send an email with summary account (email, password) after registration.'),
+ 'validation' => 'isUnsignedInt',
+ 'validation' => 'isBool',
+ 'cast' => 'intval',
+ 'type' => 'bool'
+ ),
'PS_PASSWD_TIME_FRONT' => array(
'title' => $this->l('Regenerate password'),
'desc' => $this->l('Minimum time required to regenerate a password.'),
diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php
index f5b8563b4..08b92c1aa 100644
--- a/controllers/front/AuthController.php
+++ b/controllers/front/AuthController.php
@@ -688,6 +688,9 @@ class AuthControllerCore extends FrontController
*/
protected function sendConfirmationMail(Customer $customer)
{
+ if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL'))
+ return true;
+
return Mail::Send(
$this->context->language->id,
'account',
diff --git a/install-dev/data/xml/configuration.xml b/install-dev/data/xml/configuration.xml
index 515f0762a..2494938f3 100644
--- a/install-dev/data/xml/configuration.xml
+++ b/install-dev/data/xml/configuration.xml
@@ -769,5 +769,8 @@ Country
1
+
+ 1
+
diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql
index f2f11e95a..aea6a46be 100644
--- a/install-dev/upgrade/sql/1.5.5.0.sql
+++ b/install-dev/upgrade/sql/1.5.5.0.sql
@@ -1,3 +1,5 @@
SET NAMES 'utf8';
-ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL , CHANGE `longitude` `longitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL ;
\ No newline at end of file
+ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL , CHANGE `longitude` `longitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL ;
+
+INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_CUSTOMER_CREATION_EMAIL', 1, NOW(), NOW());
\ No newline at end of file