diff --git a/models/user/user.go b/models/user/user.go index 9312a4e5b5..ac70c242b5 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -89,17 +89,17 @@ type User struct { // is to change his/her password after registration. MustChangePassword bool `xorm:"NOT NULL DEFAULT false"` - LoginType auth.Type - LoginSource int64 `xorm:"NOT NULL DEFAULT 0"` - LoginName string - Type UserType - Location string + LoginType auth.Type + LoginSource int64 `xorm:"NOT NULL DEFAULT 0"` + LoginName string + Type UserType + Location string LocationCoordinate string - Website string - Rands string `xorm:"VARCHAR(32)"` - Salt string `xorm:"VARCHAR(32)"` - Language string `xorm:"VARCHAR(5)"` - Description string + Website string + Rands string `xorm:"VARCHAR(32)"` + Salt string `xorm:"VARCHAR(32)"` + Language string `xorm:"VARCHAR(5)"` + Description string `xorm:"TEXT"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go index 8aaa654a39..4b94fe9e10 100644 --- a/routers/web/admin/users.go +++ b/routers/web/admin/users.go @@ -371,6 +371,7 @@ func EditUserPost(ctx *context.Context) { emailChanged := !strings.EqualFold(u.Email, form.Email) u.Email = form.Email u.Website = form.Website + u.Description = form.Description u.Location = form.Location u.LocationCoordinate = form.LocationCoordinate u.MaxRepoCreation = form.MaxRepoCreation diff --git a/services/forms/admin.go b/services/forms/admin.go index 435e5d4c15..8a4aaaed50 100644 --- a/services/forms/admin.go +++ b/services/forms/admin.go @@ -41,6 +41,7 @@ type AdminEditUserForm struct { Email string `binding:"Required;Email;MaxSize(254)"` Password string `binding:"MaxSize(255)"` Website string `binding:"ValidUrl;MaxSize(255)"` + Description string `binding:"MaxSize(1024)"` Location string `binding:"MaxSize(50)"` LocationCoordinate string `binding:"MaxSize(255)"` MaxRepoCreation int diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index f88e2bbc56..7487baf947 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -73,6 +73,10 @@

{{.i18n.Tr "admin.users.password_helper"}}

+
+ + +