|
|
@@ -139,8 +139,8 @@ class UserController extends BackendController |
|
|
|
} else { |
|
|
|
if ($model->load(\Yii::$app->request->post()) && $model->validate() && YII_ENV != 'demo') { |
|
|
|
|
|
|
|
$model = $userModule->getBuilder()->createUser( |
|
|
|
User::TYPE_INDIVIDUAL, |
|
|
|
$userCreate = $userModule->getBuilder()->createUser( |
|
|
|
$model->type, |
|
|
|
$model->email, |
|
|
|
$model->name, |
|
|
|
$model->lastname, |
|
|
@@ -151,10 +151,12 @@ class UserController extends BackendController |
|
|
|
Password::generate(), |
|
|
|
$model->send_mail_welcome |
|
|
|
); |
|
|
|
$userCreate->points_sale = $model->points_sale; |
|
|
|
$userCreate->user_groups = $model->user_groups; |
|
|
|
|
|
|
|
$this->processLinkPointSale($model); |
|
|
|
$this->processLinkUserGroup($model); |
|
|
|
$this->processProductPricePercent($model); |
|
|
|
$this->processLinkPointSale($userCreate); |
|
|
|
$this->processLinkUserGroup($userCreate); |
|
|
|
//$this->processProductPricePercent($model); |
|
|
|
|
|
|
|
$this->setFlash('success', 'Utilisateur créé.'); |
|
|
|
|
|
|
@@ -190,7 +192,7 @@ class UserController extends BackendController |
|
|
|
} |
|
|
|
$this->processLinkPointSale($model); |
|
|
|
$this->processLinkUserGroup($model); |
|
|
|
$this->processProductPricePercent($model); |
|
|
|
//$this->processProductPricePercent($model); |
|
|
|
|
|
|
|
if($model->newsletter) { |
|
|
|
$userModule->getNewsletterManager()->subscribeUserNewsletter($model); |