low case email

This commit is contained in:
Tao Chen
2024-11-03 05:25:10 +08:00
parent 9ed376715f
commit 1ca50b5e9d

View File

@@ -1,5 +1,9 @@
package model
import (
"strings"
)
type UserThird struct {
IdModel
UserId uint ` json:"user_id" gorm:"not null;index"`
@@ -16,4 +20,6 @@ func (u *UserThird) FromOauthUser(userId uint, oauthUser *OauthUser, oauthType s
u.OauthUser = *oauthUser
u.OauthType = oauthType
u.Op = op
// make sure email is lower case
u.Email = strings.ToLower(u.Email)
}