fix(console): only show verified emails and phonenumbers as loginoptions (#5073)

* fix: only show verified emails and phonenumbers as loginoptions

* rm submodules
This commit is contained in:
Max Peintner 2023-01-19 07:55:16 +01:00 committed by GitHub
parent a36fdf8fe6
commit b0ce17c5e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}