Fix add/update salted password.

This commit is contained in:
Yang Luo
2021-05-16 21:04:26 +08:00
parent 18806f07a8
commit 4b9ce5f401
5 changed files with 30 additions and 4 deletions

View File

@ -57,7 +57,7 @@ func CheckUserSignup(organizationName string, username string, password string,
}
}
func checkPassword(user *User, password string) string {
func CheckPassword(user *User, password string) string {
organization := getOrganization("admin", user.Owner)
if organization.PasswordType == "plain" {
@ -87,7 +87,7 @@ func CheckUserLogin(organization string, username string, password string) (*Use
return nil, "the user is forbidden to sign in, please contact the administrator"
}
msg := checkPassword(user, password)
msg := CheckPassword(user, password)
if msg != "" {
return nil, msg
}