Update password change flow and UI text

After a successful password change, users are now logged out and redirected to the login page instead of updating credentials in local storage. Also removed unused password hints and user info text from the reset password modal, and updated the error message for duplicate user IDs in the English translations.
dev-pending-20-01-2026
Naeem Ullah 6 days ago
parent df9258b77c
commit 9b323539bb

@ -174,24 +174,8 @@ constructor(
next: (response) => { next: (response) => {
if (!(response instanceof HttpErrorResponse)) { if (!(response instanceof HttpErrorResponse)) {
this.i18nService.success(SuccessMessages.CHANGE_PASSWORD_SUCCESS, []); this.i18nService.success(SuccessMessages.CHANGE_PASSWORD_SUCCESS, []);
this.authService.logout();
const userStr = this.storageService.getItem('user'); this.router.navigate(['login']);
if (userStr) {
const user = JSON.parse(userStr);
user.requiresPasswordChange = false;
if (user.user) {
user.user.firstLogin = false;
}
if (payload.newPassword) {
this.storageService.setItem(FormConstants.PASSWORD, payload.newPassword);
}
this.storageService.setItem('user', JSON.stringify(user));
this.authService.updateCredentialsAfterPasswordChange(payload.newPassword);
}
this.router.navigate(['/home/dashboard']);
} }
}, },
error: (error) => { error: (error) => {

@ -33,7 +33,7 @@
<i class="fas fa-user"></i> <i class="fas fa-user"></i>
</span> </span>
</div> </div>
<small class="text-muted">{{ 'resettingPasswordForThisUser' | translate }}</small>
</div> </div>
<form [formGroup]="resetPasswordForm" *ngIf="userId"> <form [formGroup]="resetPasswordForm" *ngIf="userId">
@ -81,7 +81,6 @@
<!-- Password requirements hint --> <!-- Password requirements hint -->
<div class="form-text text-muted"> <div class="form-text text-muted">
<small>{{ 'passwordRequirements' | translate }}</small>
</div> </div>
</div> </div>

@ -257,7 +257,7 @@
"noThirdPartyRegFound":"No Third Party Registration Details Found", "noThirdPartyRegFound":"No Third Party Registration Details Found",
"ERR_SEC_0001": "Email already exists", "ERR_SEC_0001": "Email already exists",
"ERR_SEC_0007": "New password cannot be same as old password", "ERR_SEC_0007": "New password cannot be same as old password",
"ERR_SEC_0002": "Username already exists", "ERR_SEC_0002": "User ID already exists",
"ERR_SEC_0003": "Old Password is not correct", "ERR_SEC_0003": "Old Password is not correct",
"ERR_SEC_0004":"Invalid credentials", "ERR_SEC_0004":"Invalid credentials",
"ERR_SEC_0005": "User not found", "ERR_SEC_0005": "User not found",

Loading…
Cancel
Save