diff options
| author | raeno <just.raeno@gmail.com> | 2018-11-30 17:30:55 +0400 |
|---|---|---|
| committer | raeno <just.raeno@gmail.com> | 2018-11-30 17:30:55 +0400 |
| commit | 0c3cd05965c591d136207ac88a598209e371dbb6 (patch) | |
| tree | 3ea2e767748cec8382825ce7e3fb643ba6bfa75f | |
| parent | 91272dc5558e1326dac872f927dc8da7f9109cd0 (diff) | |
Logout user on password change
| -rw-r--r-- | src/components/user_settings/user_settings.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index a6203962..b1d7663f 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -235,6 +235,7 @@ const UserSettings = { if (res.status === 'success') { this.changedPassword = true this.changePasswordError = false + this._logout() } else { this.changedPassword = false this.changePasswordError = res.error @@ -243,6 +244,10 @@ const UserSettings = { }, activateTab (tabName) { this.activeTab = tabName + }, + _logout () { + this.$store.dispatch('logout') + this.$router.replace('/') } } } |
