1
0
Fork 0
forked from forgejo/forgejo

Finish update password and profile

This commit is contained in:
Unknown 2014-03-14 01:12:07 -04:00
parent 495a52d78b
commit 47edf7f4f9
10 changed files with 72 additions and 33 deletions

View file

@ -49,6 +49,7 @@ type User struct {
NumStars int
NumRepos int
Avatar string `xorm:"varchar(2048) not null"`
AvatarEmail string `xorm:"not null"`
Location string
Website string
Created time.Time `xorm:"created"`
@ -106,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
}