@@ -155,9 +155,14 @@ class UserController extends BackendController | |||
{ | |||
$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) { | |||
Producer::addUser($userExist->id, GlobalParam::getCurrentProducerId()) ; |