diff options
author | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
commit | 1f2e173a745da8e4b57f96b5561a3c10054d3b76 (patch) | |
tree | 367f0f07e4fe1269ac0772e0561a4bf912b5153c /models/user_mail.go | |
parent | 46e96c008cf966428c9dad71c7871de88186e3fe (diff) | |
download | gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip |
Refactor User.Id to User.ID
Diffstat (limited to 'models/user_mail.go')
-rw-r--r-- | models/user_mail.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user_mail.go b/models/user_mail.go index bb5f29d879..9a1804c91a 100644 --- a/models/user_mail.go +++ b/models/user_mail.go @@ -160,7 +160,7 @@ func MakeEmailPrimary(email *EmailAddress) error { return ErrEmailNotActivated } - user := &User{Id: email.UID} + user := &User{ID: email.UID} has, err = x.Get(user) if err != nil { return err @@ -182,7 +182,7 @@ func MakeEmailPrimary(email *EmailAddress) error { } if !has { - formerPrimaryEmail.UID = user.Id + formerPrimaryEmail.UID = user.ID formerPrimaryEmail.IsActivated = user.IsActive if _, err = sess.Insert(formerPrimaryEmail); err != nil { return err @@ -190,7 +190,7 @@ func MakeEmailPrimary(email *EmailAddress) error { } user.Email = email.Email - if _, err = sess.Id(user.Id).AllCols().Update(user); err != nil { + if _, err = sess.Id(user.ID).AllCols().Update(user); err != nil { return err } |