mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Case where a user has not activated his email he gets redirected to /thx/login with a message to check his eamils.
This commit is contained in:
parent
00f08ff2db
commit
03faac6ecb
@ -50,7 +50,7 @@ const routes = [
|
|||||||
path: '/thx/:comingFrom',
|
path: '/thx/:comingFrom',
|
||||||
component: () => import('../views/Pages/thx.vue'),
|
component: () => import('../views/Pages/thx.vue'),
|
||||||
beforeEnter: (to, from, next) => {
|
beforeEnter: (to, from, next) => {
|
||||||
const validFrom = ['password', 'reset', 'register', 'login']
|
const validFrom = ['password', 'reset', 'register', 'login', 'Login']
|
||||||
if (!validFrom.includes(from.path.split('/')[1])) {
|
if (!validFrom.includes(from.path.split('/')[1])) {
|
||||||
next({ path: '/login' })
|
next({ path: '/login' })
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -88,7 +88,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('comingFrom', this.$route.params.comingFrom)
|
|
||||||
if (this.$route.params.comingFrom) {
|
if (this.$route.params.comingFrom) {
|
||||||
this.displaySetup = textFields[this.$route.params.comingFrom]
|
this.displaySetup = textFields[this.$route.params.comingFrom]
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -105,11 +105,11 @@ export default {
|
|||||||
loader.hide()
|
loader.hide()
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (!error.message.includes('user email not validated')) {
|
if (!error.message.includes('User email not validated')) {
|
||||||
this.$toasted.error(this.$t('error.no-account'))
|
this.$toasted.error(this.$t('error.no-account'))
|
||||||
} else {
|
} else {
|
||||||
// : this.$t('error.no-email-verify')
|
// : this.$t('error.no-email-verify')
|
||||||
this.$router.push('/thx/login')
|
this.$router.push('/reset/login')
|
||||||
}
|
}
|
||||||
loader.hide()
|
loader.hide()
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user