$userExist = false ; | $userExist = false ; | ||||
$posts = Yii::$app->request->post() ; | $posts = Yii::$app->request->post() ; | ||||
if($posts) { | |||||
if($posts && isset($posts['User']['email']) && strlen($posts['User']['email']) > 0) { | |||||
$userExist = User::searchOne([ | $userExist = User::searchOne([ | ||||
'email' => $posts['User']['email'] | 'email' => $posts['User']['email'] | ||||
]); | ]); |