Fix bug in first name, last name checking

This commit is contained in:
Gucheng Wang
2022-02-28 13:17:05 +08:00
parent e19f07c521
commit c14bf9fdab
2 changed files with 6 additions and 4 deletions

View File

@ -85,7 +85,7 @@ func CheckUserSignup(application *Application, organization *Organization, usern
}
if application.IsSignupItemVisible("Display name") {
if application.GetSignupItemRule("Display name") == "First, last" {
if application.GetSignupItemRule("Display name") == "First, last" && (firstName != "" || lastName != "") {
if firstName == "" {
return "firstName cannot be blank"
} else if lastName == "" {