Skip to content

Commit

Permalink
Changing metadata in a user profile without specifying a password bri…
Browse files Browse the repository at this point in the history
…ngs up a success and an error panel (#3818)

* Agregar validador para mostrar mensaje de error solo si se escribe la contraseña actual

* Agregar validador para mostrar mensaje de error solo si se escribe la contraseña actual

* Set constant variable for valid current password in profile page
  • Loading branch information
VictorDuranEscire authored Jan 28, 2025
1 parent 0523974 commit 47159fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/profile-page/profile-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ export class ProfilePageComponent implements OnInit {
*/
updateSecurity() {
const passEntered = isNotEmpty(this.password);
if (this.invalidSecurity) {
const validCurrentPassword = isNotEmpty(this.currentPassword);
if (validCurrentPassword && !passEntered) {
this.notificationsService.error(this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.general'));
}
if (!this.invalidSecurity && passEntered) {
Expand Down

0 comments on commit 47159fe

Please sign in to comment.