diff options
Diffstat (limited to 'routers/admin/users.go')
-rw-r--r-- | routers/admin/users.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/admin/users.go b/routers/admin/users.go index c95aba7729..fa61a46938 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -197,7 +197,11 @@ func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) { if len(form.Password) > 0 { u.Passwd = form.Password - u.Salt = models.GetUserSalt() + var err error + if u.Salt, err = models.GetUserSalt(); err != nil { + ctx.Handle(500, "UpdateUser", err) + return + } u.EncodePasswd() } |