feat: fix bug that user can signup without invitation code via OAuth (#3084)

* fix:fix user can signup without invitation code when using 3rd oauth

* fix:use correct i18n translation
This commit is contained in:
DacongDA 2024-07-29 00:59:02 +08:00 committed by GitHub
parent e65fdeb1e0
commit 55a52093e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -665,6 +665,11 @@ func (c *ApiController) Login() {
return
}
if application.IsSignupItemRequired("Invitation code") {
c.ResponseError(c.T("check:Invitation code cannot be blank"))
return
}
// Handle username conflicts
var tmpUser *object.User
tmpUser, err = object.GetUser(util.GetId(application.Organization, userInfo.Username))