1 #914
|
@ -83,13 +83,13 @@ func (l *LoginBusinessValidator) EnsureNewMobilePhoneNotRegistered(QueryFunc fun
|
|||
|
||||
phoneHash := mycrypto.CryptoServiceInstance().SHA256.Encrypt([]byte(mobilePhone))
|
||||
|
||||
account, err := QueryFunc(l.ctx, phoneHash)
|
||||
accounts, err := QueryFunc(l.ctx, phoneHash)
|
||||
if err != nil {
|
||||
logger.Error("Query account failed, err: %v", err)
|
||||
l.ec = errcode.ErrCodeAccountSrvFail
|
||||
return
|
||||
}
|
||||
if account != nil {
|
||||
if len(accounts) > 0 {
|
||||
logger.Error("This mobile phone has been registered")
|
||||
l.ec = errcode.ErrCodeLoginMobilePhoneHasBeenRegistered
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue