summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-22 16:00:46 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-22 16:00:46 -0400
commit59ffdbf6f80328f9b9074930444dedd936aeae51 (patch)
tree486e9ad694a510db04453e259010ed60bd215ffd /models/user.go
parentb3cfd9fe0c293ba9d84d38ec140db2c01b1e3109 (diff)
downloadgitea-59ffdbf6f80328f9b9074930444dedd936aeae51.tar.gz
gitea-59ffdbf6f80328f9b9074930444dedd936aeae51.zip
Add create, list, view issue
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
index 88c29ae43e..9333d1ee67 100644
--- a/models/user.go
+++ b/models/user.go
@@ -201,6 +201,13 @@ func VerifyUserActiveCode(code string) (user *User) {
// UpdateUser updates user's information.
func UpdateUser(user *User) (err error) {
+ if len(user.Location) > 255 {
+ user.Location = user.Location[:255]
+ }
+ if len(user.Website) > 255 {
+ user.Website = user.Website[:255]
+ }
+
_, err = orm.Id(user.Id).UseBool().Cols("website", "location").Update(user)
return err
}