{ | { | ||||
$model = new User(); | $model = new User(); | ||||
$userExist = User::searchOne([ | |||||
'email' => Yii::$app->request->post('email') | |||||
]); | |||||
$userExist = false ; | |||||
$posts = Yii::$app->request->post() ; | |||||
if($posts) { | |||||
$userExist = User::searchOne([ | |||||
'email' => $posts['User']['email'] | |||||
]); | |||||
} | |||||
if ($userExist) { | if ($userExist) { | ||||
Producer::addUser($userExist->id, GlobalParam::getCurrentProducerId()) ; | Producer::addUser($userExist->id, GlobalParam::getCurrentProducerId()) ; |