mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
feat: refactor reset password api and forgetPage.js (#1601)
This commit is contained in:
@ -53,9 +53,11 @@ func GetUserByFields(organization string, field string) *User {
|
||||
}
|
||||
|
||||
// check email
|
||||
user = GetUserByField(organization, "email", field)
|
||||
if user != nil {
|
||||
return user
|
||||
if strings.Contains(field, "@") {
|
||||
user = GetUserByField(organization, "email", field)
|
||||
if user != nil {
|
||||
return user
|
||||
}
|
||||
}
|
||||
|
||||
// check phone
|
||||
|
Reference in New Issue
Block a user