low case email
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
type UserThird struct {
|
type UserThird struct {
|
||||||
IdModel
|
IdModel
|
||||||
UserId uint ` json:"user_id" gorm:"not null;index"`
|
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.OauthUser = *oauthUser
|
||||||
u.OauthType = oauthType
|
u.OauthType = oauthType
|
||||||
u.Op = op
|
u.Op = op
|
||||||
|
// make sure email is lower case
|
||||||
|
u.Email = strings.ToLower(u.Email)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user