public function login()
{
if ($this->validate()) {
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
}else{
return false;
}
}
if ($model->load(Yii::$app->request->post()) && $model->login()) {
print_r($model->getErrors());
return $this->goBack();
} else {
print_r($model->getErrors());
}