diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-14 23:54:16 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-14 23:54:16 +0800 |
commit | b27e8e87f8be2d11468e9057254b6c8933e0af33 (patch) | |
tree | bbfb32d7e248ae6f2ec63164722523d96447848a /models/user.go | |
parent | 607303e4dee3ddf9ba3d9d67b0186fc5213b167b (diff) | |
parent | d18237850c6a4ae855b3f8592994c91462fcdb0a (diff) |
add tree view
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index c59e4ae1..8f7a37cb 100644 --- a/models/user.go +++ b/models/user.go @@ -48,7 +48,10 @@ type User struct { NumFollowings int NumStars int NumRepos int - Avatar string `xorm:"varchar(2048) not null"` + Avatar string `xorm:"varchar(2048) not null"` + AvatarEmail string `xorm:"not null"` + Location string + Website string Created time.Time `xorm:"created"` Updated time.Time `xorm:"updated"` } @@ -104,6 +107,7 @@ func RegisterUser(user *User) (err error) { user.LowerName = strings.ToLower(user.Name) user.Avatar = base.EncodeMd5(user.Email) + user.AvatarEmail = user.Email if err = user.EncodePasswd(); err != nil { return err } |