|
|
@@ -198,12 +198,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
|
|
|
}
|
|
|
|
|
|
if strutils.IsStringNotEmpty(phone) {
|
|
|
- encryptedPassword, err := encoding.AESEncrypt(phone, simple.AESKey)
|
|
|
+ encryptedPhone, err := encoding.AESEncrypt(phone, simple.AESKey)
|
|
|
if err != nil {
|
|
|
return false, errors.New(err.Error())
|
|
|
}
|
|
|
|
|
|
- conditions.Equal(ColumnPhone, encryptedPassword)
|
|
|
+ conditions.Equal(ColumnPhone, encryptedPhone)
|
|
|
}
|
|
|
|
|
|
return true, nil
|
|
|
@@ -214,12 +214,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
|
|
|
}
|
|
|
|
|
|
if strutils.IsStringNotEmpty(email) {
|
|
|
- encryptedPassword, err := encoding.AESEncrypt(email, simple.AESKey)
|
|
|
+ encryptedEmail, err := encoding.AESEncrypt(email, simple.AESKey)
|
|
|
if err != nil {
|
|
|
return false, errors.New(err.Error())
|
|
|
}
|
|
|
|
|
|
- conditions.Equal(ColumnEmail, encryptedPassword)
|
|
|
+ conditions.Equal(ColumnEmail, encryptedEmail)
|
|
|
}
|
|
|
|
|
|
return true, nil
|