Merge pull request #2459 from dpalou/MOBILE-3485

MOBILE-3485 login: Reset password input if password change forced
main
Juan Leyva 2020-07-15 15:04:35 +02:00 committed by GitHub
commit fe91f7e602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -249,6 +249,9 @@ export class CoreLoginCredentialsPage {
this.loginHelper.treatUserTokenError(siteUrl, error, username, password); this.loginHelper.treatUserTokenError(siteUrl, error, username, password);
if (error.loggedout) { if (error.loggedout) {
this.navCtrl.setRoot('CoreLoginSitesPage'); this.navCtrl.setRoot('CoreLoginSitesPage');
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
} }
}).finally(() => { }).finally(() => {
modal.dismiss(); modal.dismiss();

View File

@ -221,6 +221,9 @@ export class CoreLoginReconnectPage {
if (error.loggedout) { if (error.loggedout) {
this.cancel(); this.cancel();
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
} }
}).finally(() => { }).finally(() => {
modal.dismiss(); modal.dismiss();