diff options
Diffstat (limited to 'routers/api/v1/admin/user.go')
-rw-r--r-- | routers/api/v1/admin/user.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 93b28c2175..670baf020b 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -174,7 +174,10 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { ctx.Error(http.StatusInternalServerError, "UpdateUser", err) return } - u.HashPassword(form.Password) + if err = u.SetPassword(form.Password); err != nil { + ctx.InternalServerError(err) + return + } } if form.MustChangePassword != nil { |