Registrazione senza Telegram

This commit is contained in:
Surya Paolo
2022-12-09 01:03:52 +01:00
parent 56411a4539
commit 771271fda2
33 changed files with 130 additions and 51 deletions

View File

@@ -4999,6 +4999,9 @@ export const tools = {
isVerified(): boolean {
const globalStore = useGlobalStore()
const site = globalStore.site
if (site.confpages.enableRegMultiChoice) {
return tools.TelegVerificato() || this.isEmailVerified()
}
if (site.confpages.enabledRegNeedTelegram) {
return tools.TelegVerificato()
@@ -5010,7 +5013,8 @@ export const tools = {
Verificato() {
const userStore = useUserStore()
return this.isVerified() && userStore.my.verified_by_aportador
const globalStore = useGlobalStore()
return this.isVerified() && (userStore.my.verified_by_aportador || globalStore.site.confpages.enableRegMultiChoice)
},

View File

@@ -389,7 +389,13 @@ export const useUserStore = defineStore('UserStore', {
},
isUserOk(): boolean {
return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()
const globalStore = useGlobalStore()
if (globalStore.site.confpages.enableRegMultiChoice) {
return (this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()) || this.my.verified_email!
} else {
return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()
}
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
},