mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:11:47 +08:00
feat: support "Use Email as username" in org (#3002)
Signed-off-by: Grégoire Bélorgey <gregoire@jianda.fr>
This commit is contained in:
@ -169,7 +169,11 @@ func (c *ApiController) Signup() {
|
||||
|
||||
username := authForm.Username
|
||||
if !application.IsSignupItemVisible("Username") {
|
||||
username = id
|
||||
if organization.UseEmailAsUsername && application.IsSignupItemVisible("Email") {
|
||||
username = authForm.Email
|
||||
} else {
|
||||
username = id
|
||||
}
|
||||
}
|
||||
|
||||
initScore, err := organization.GetInitScore()
|
||||
|
Reference in New Issue
Block a user