Преглед изворни кода

Updating custom css field should also happen when updating the password

Bug introduced in PR #627
Frédéric Guillot пре 6 година
родитељ
комит
eb8d8e84f2
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      storage/user.go

+ 3 - 4
storage/user.go

@@ -172,11 +172,10 @@ func (s *Storage) UpdateUser(user *model.User) error {
 		if err != nil {
 		if err != nil {
 			return fmt.Errorf(`store: unable to update user: %v`, err)
 			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
 	return nil