fixed all tests

This commit is contained in:
Antonio Ramirez
2016-12-11 21:34:22 +01:00
parent 4588d77129
commit 4c9b9671b5
37 changed files with 214 additions and 135 deletions

View File

@ -126,6 +126,7 @@ class SettingsController extends Controller
public function actionAccount()
{
/** @var SettingsForm $form */
$form = $this->make(SettingsForm::class);
$event = $this->make(FormEvent::class, [$form]);
@ -133,8 +134,9 @@ class SettingsController extends Controller
if ($form->load(Yii::$app->request->post())) {
$this->trigger(UserEvent::EVENT_BEFORE_ACCOUNT_UPDATE, $event);
if ($form->save()) {
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Your account details have been updated-'));
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Your account details have been updated'));
$this->trigger(UserEvent::EVENT_AFTER_ACCOUNT_UPDATE, $event);
return $this->refresh();