diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index c5c9c73be..acce0ccdb 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -33,9 +33,9 @@ export class LoginPage implements OnInit { password: string = environment.defaultuserpwd; userattempt: UserForm; code = [] - setPint = false - pin = localStorage.getItem('PIN') != null + setPint = false + pin = false userLoginPreference: any @@ -57,10 +57,17 @@ export class LoginPage implements OnInit { if (userData.hasOwnProperty('loginPreference')) { this.userLoginPreference = userData.loginPreference + this.pin = true + this.setPint = false + } else { + this.userLoginPreference = '' this.setPint = true + this.pin = false + } + } ngOnInit() {} @@ -127,7 +134,7 @@ export class LoginPage implements OnInit { this.authService.loginChat(this.userattempt); //this.getToken(); - if(!this.pin) { + if(!this.pin && this.userLoginPreference != 'pin' && this.userLoginPreference != 'none') { this.setPint = true this.pin = true } else {