Skip to content

Commit 47159fe

Browse files
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
1 parent 0523974 commit 47159fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/profile-page/profile-page.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ export class ProfilePageComponent implements OnInit {
220220
*/
221221
updateSecurity() {
222222
const passEntered = isNotEmpty(this.password);
223-
if (this.invalidSecurity) {
223+
const validCurrentPassword = isNotEmpty(this.currentPassword);
224+
if (validCurrentPassword && !passEntered) {
224225
this.notificationsService.error(this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.general'));
225226
}
226227
if (!this.invalidSecurity && passEntered) {

0 commit comments

Comments
 (0)