From 0c3cd05965c591d136207ac88a598209e371dbb6 Mon Sep 17 00:00:00 2001 From: raeno Date: Fri, 30 Nov 2018 17:30:55 +0400 Subject: [PATCH] Logout user on password change --- src/components/user_settings/user_settings.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index a62039626f..b1d7663f5c 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('/') } } }