From b0ce17c5e82d09f5af0cf0b1a5fb6d5c27b2e85f Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Thu, 19 Jan 2023 07:55:16 +0100 Subject: [PATCH] fix(console): only show verified emails and phonenumbers as loginoptions (#5073) * fix: only show verified emails and phonenumbers as loginoptions * rm submodules --- .../src/app/modules/info-row/info-row.component.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/console/src/app/modules/info-row/info-row.component.ts b/console/src/app/modules/info-row/info-row.component.ts index 07ced339e5..35e682e4a1 100644 --- a/console/src/app/modules/info-row/info-row.component.ts +++ b/console/src/app/modules/info-row/info-row.component.ts @@ -39,10 +39,18 @@ export class InfoRowComponent { let email: string = ''; let phone: string = ''; if (this.loginPolicy) { - if (!this.loginPolicy?.disableLoginWithEmail && this.user.human?.email?.email) { + if ( + !this.loginPolicy?.disableLoginWithEmail && + this.user.human?.email?.email && + this.user.human.email.isEmailVerified + ) { email = this.user.human?.email?.email; } - if (!this.loginPolicy?.disableLoginWithPhone && this.user.human?.phone?.phone) { + if ( + !this.loginPolicy?.disableLoginWithPhone && + this.user.human?.phone?.phone && + this.user.human.phone.isPhoneVerified + ) { phone = this.user.human?.phone?.phone; } }