$r = $user->save();
$errors=$user->getErrors();
$msgs='';
foreach ($errors as $key => $err) {
foreach ($err as $msg) {
$msgs.=$msg;
Yii::trace($key.":$msg",'user');
}
}
if($msgs){
Yii::$app->session->setFlash('info',$msgs);
}
网友评论