mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-07 19:50:33 +08:00
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:
@@ -665,6 +665,11 @@ func (c *ApiController) Login() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if application.IsSignupItemRequired("Invitation code") {
|
||||||
|
c.ResponseError(c.T("check:Invitation code cannot be blank"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Handle username conflicts
|
// Handle username conflicts
|
||||||
var tmpUser *object.User
|
var tmpUser *object.User
|
||||||
tmpUser, err = object.GetUser(util.GetId(application.Organization, userInfo.Username))
|
tmpUser, err = object.GetUser(util.GetId(application.Organization, userInfo.Username))
|
||||||
|
Reference in New Issue
Block a user