From 5a5c1f18e3a1e20b892899106139ef97d5a55f30 Mon Sep 17 00:00:00 2001 From: VictorDuranEscire Date: Tue, 28 Jan 2025 17:07:00 -0600 Subject: [PATCH] Changing metadata in a user profile without specifying a password brings up a success and an error panel (#3818) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- src/app/profile-page/profile-page.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/profile-page/profile-page.component.ts b/src/app/profile-page/profile-page.component.ts index f8cb30a447..7fb1a14124 100644 --- a/src/app/profile-page/profile-page.component.ts +++ b/src/app/profile-page/profile-page.component.ts @@ -173,7 +173,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) {