forked from forgejo/forgejo
Finish update password and profile
This commit is contained in:
parent
495a52d78b
commit
47edf7f4f9
10 changed files with 72 additions and 33 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue