diff --git a/modules/auth/admin.go b/modules/auth/admin.go index e6cc82cd3..a95b83de6 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -11,6 +11,7 @@ import ( ) type AdminEditUserForm struct { + FullName string `form:"fullname" binding:"MaxSize(100)"` Email string `binding:"Required;Email;MaxSize(50)"` Password string `binding:"OmitEmpty;MinSize(6);MaxSize(255)"` Website string `binding:"MaxSize(50)"` diff --git a/routers/admin/users.go b/routers/admin/users.go index ddcca6390..12c52236f 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -185,6 +185,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) { u.EncodePasswd() } + u.FullName = form.FullName u.Email = form.Email u.Website = form.Website u.Location = form.Location diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index bdc0e3343..4f4cc727a 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -32,6 +32,10 @@ +