From eb8d8e84f20444d72e7502bbee9a25131e8e2eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 25 Apr 2020 20:18:10 -0700 Subject: [PATCH] Updating custom css field should also happen when updating the password Bug introduced in PR #627 --- storage/user.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/storage/user.go b/storage/user.go index 0463c6f8..8c96569c 100644 --- a/storage/user.go +++ b/storage/user.go @@ -172,11 +172,10 @@ func (s *Storage) UpdateUser(user *model.User) error { if err != nil { return fmt.Errorf(`store: unable to update user: %v`, err) } + } - err = s.UpdateExtraField(user.ID, "custom_css", user.Extra["custom_css"]) - if err != nil { - return fmt.Errorf(`store: unable to update user css: %v`, err) - } + if err := s.UpdateExtraField(user.ID, "custom_css", user.Extra["custom_css"]); err != nil { + return fmt.Errorf(`store: unable to update user custom css: %v`, err) } return nil