|
|
@@ -220,7 +220,7 @@ class SignupForm extends Model |
|
|
|
$user->phone = $this->phone; |
|
|
|
|
|
|
|
if ($this->option_user_producer == 'producer') { |
|
|
|
// etablissement |
|
|
|
// producteur |
|
|
|
$producer = new Producer; |
|
|
|
$producer->name = $this->name_producer; |
|
|
|
$producer->type = $this->type; |
|
|
@@ -263,7 +263,7 @@ class SignupForm extends Model |
|
|
|
if ($user->save()) { |
|
|
|
|
|
|
|
// on ajoute l'établissement sélectionnée par l'user en favoris |
|
|
|
if ($this->option_user_producer == 'producer') { |
|
|
|
if ($this->option_user_producer == 'user') { |
|
|
|
if ($this->id_producer) { |
|
|
|
$producer = Producer::find()->where(['id' => $this->id_producer])->one(); |
|
|
|
if ($producer) { |
|
|
@@ -287,7 +287,7 @@ class SignupForm extends Model |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($this->option_user_producer == 'producer') { |
|
|
|
if ($this->option_user_producer == 'user') { |
|
|
|
$userProducer = new UserProducer; |
|
|
|
$userProducer->id_producer = $producer->id; |
|
|
|
$userProducer->id_user = $user->id; |