Форма смены ника теперь принимает аккаунт через конструктор

This commit is contained in:
ErickSkrauch
2017-06-17 22:06:04 +03:00
parent cb068b9dc0
commit 1169097adb
3 changed files with 29 additions and 18 deletions

View File

@@ -90,7 +90,8 @@ class AccountsController extends Controller {
}
public function actionChangeUsername() {
$model = new ChangeUsernameForm();
$account = Yii::$app->user->identity;
$model = new ChangeUsernameForm($account);
$model->load(Yii::$app->request->post());
if (!$model->change()) {
return [