This commit is contained in:
kolaente 2018-10-05 18:46:05 +02:00
parent 358b569bf1
commit 6ea4f0598c
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -49,7 +49,7 @@ func UserChangePassword(c echo.Context) error {
}
// Check the current password
if _, err = models.CheckUserCredentials(&models.UserLogin{Username:doer.Username,Password:newPW.OldPassword}); err != nil {
if _, err = models.CheckUserCredentials(&models.UserLogin{Username: doer.Username, Password: newPW.OldPassword}); err != nil {
if models.IsErrUserDoesNotExist(err) {
return echo.NewHTTPError(http.StatusNotFound, "The user does not exist.")
}