From 45b1f43d093742098aed5613e48e0eed0eab90ed Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 25 Apr 2016 00:30:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=BB=D0=BE=D0=B3=D0=B8=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D1=81=D0=B5=D1=85=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=83=D1=81=D1=82=D1=80=D0=BE=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=BE=D0=BB=D1=8F=20(=D0=BF=D0=BE=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=D0=B8=D0=BC=D0=BF=D0=BB=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D1=86=D0=B8=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/ChangePasswordForm.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/models/ChangePasswordForm.php b/api/models/ChangePasswordForm.php index 36bf256..df5ad81 100644 --- a/api/models/ChangePasswordForm.php +++ b/api/models/ChangePasswordForm.php @@ -13,6 +13,8 @@ class ChangePasswordForm extends PasswordProtectedForm { public $newRePassword; + public $logoutAll; + /** * @var \common\models\Account */ @@ -27,6 +29,7 @@ class ChangePasswordForm extends PasswordProtectedForm { ['newRePassword', 'required', 'message' => 'error.newRePassword_required'], ['newPassword', 'string', 'min' => 8, 'tooShort' => 'error.password_too_short'], ['newRePassword', 'validatePasswordAndRePasswordMatch'], + ['logoutAll', 'boolean'], ]); } @@ -49,6 +52,10 @@ class ChangePasswordForm extends PasswordProtectedForm { $account = $this->_account; $account->setPassword($this->newPassword); + if ($this->logoutAll) { + // TODO: реализовать процесс разлогинивания всех авторизованных устройств и дописать под это всё тесты + } + return $account->save(); }