Changing metadata in a user profile without specifying a password brings 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
This commit is contained in:
VictorDuranEscire
2025-01-28 17:07:00 -06:00
committed by GitHub
parent 05239743ac
commit 47159fe15b

View File

@@ -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) {