forked from forgejo/forgejo
Make possible for administrators to change user's password (fix proposal for #290)
This commit is contained in:
parent
6418caf23a
commit
5a97cc69ed
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue