Support Email and phone login.

This commit is contained in:
Yang Luo
2021-05-01 20:23:20 +08:00
parent 5b1b8662ac
commit 0f7cd56441
5 changed files with 30 additions and 8 deletions

View File

@ -56,9 +56,9 @@ func CheckUserSignup(organization string, username string, password string, disp
}
func CheckUserLogin(organization string, username string, password string) (*User, string) {
user := GetUserByField(organization, "name", username)
user := GetUserByFields(organization, username)
if user == nil {
return nil, "username does not exist, please sign up first"
return nil, "the user does not exist, please sign up first"
}
if user.Password != password {