mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-25 22:36:53 +08:00
Make possible for administrators to change user's password (fix proposal for #290)
This commit is contained in:
@ -134,6 +134,13 @@ func EditUserPost(ctx *middleware.Context, params martini.Params, form auth.Admi
|
||||
return
|
||||
}
|
||||
|
||||
if (form.Passwd != "") {
|
||||
u.Passwd = form.Passwd
|
||||
u.Rands = models.GetUserSalt()
|
||||
u.Salt = models.GetUserSalt()
|
||||
u.EncodePasswd()
|
||||
}
|
||||
|
||||
u.Email = form.Email
|
||||
u.Website = form.Website
|
||||
u.Location = form.Location
|
||||
|
Reference in New Issue
Block a user