修改email只能小写
This commit is contained in:
1 parent
db4cfbf605
commit
f1e56272ef
1 file changed
+1
-1
@@ -362,7 +362,7 @@ func (this *UserService) UpdateEmail(token string) (ok bool, msg, email string)
|
|||||||
tokenInfo := info.Token{}
|
tokenInfo := info.Token{}
|
||||||
if ok, msg, tokenInfo = tokenService.VerifyToken(token, info.TokenUpdateEmail); ok {
|
if ok, msg, tokenInfo = tokenService.VerifyToken(token, info.TokenUpdateEmail); ok {
|
||||||
// 修改之后的邮箱
|
// 修改之后的邮箱
|
||||||
email = tokenInfo.Email
|
email = strings.ToLower(tokenInfo.Email)
|
||||||
// 先验证该email是否被注册了
|
// 先验证该email是否被注册了
|
||||||
if userService.IsExistsUser(email) {
|
if userService.IsExistsUser(email) {
|
||||||
ok = false
|
ok = false
|
||||||
|
|||||||
Reference in new issue
Block a user