From 8b60ba623a3cbed21f35bfaa7e4957c36c16f5c5 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 26 Jan 2022 14:47:21 +0100 Subject: [PATCH] Storing email in the store in case email not validated and no password set now. Taking email from store on forgotpassword. --- frontend/src/views/Pages/ForgotPassword.vue | 3 ++- frontend/src/views/Pages/Login.vue | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Pages/ForgotPassword.vue b/frontend/src/views/Pages/ForgotPassword.vue index 654711dc7..c53015af7 100644 --- a/frontend/src/views/Pages/ForgotPassword.vue +++ b/frontend/src/views/Pages/ForgotPassword.vue @@ -19,7 +19,7 @@ - +
{{ $t(displaySetup.button) }} @@ -68,6 +68,7 @@ export default { email: '', }, displaySetup: {}, + defaultEmail: this.$store.state.email, } }, methods: { diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index 4d2b75d2a..5a05fa8a5 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -107,8 +107,10 @@ export default { .catch((error) => { this.$toasted.global.error(this.$t('error.no-account')) if (error.message.includes('User email not validated')) { + this.$store.commit('email', this.form.email) this.$router.push('/thx/login') } else if (error.message.includes('User has no password set yet')) { + this.$store.commit('email', this.form.email) this.$router.push('/reset/login') } loader.hide()