Browse Source

support edu

tags/v1.22.1.3
lewis 3 years ago
parent
commit
a997dfbefe
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/auth/user_form.go

+ 5
- 0
modules/auth/user_form.go View File

@@ -105,6 +105,11 @@ func (f RegisterForm) IsEmailDomainWhitelisted() bool {
}

domain := strings.ToLower(f.Email[n+1:])
//support edu.cn
if strings.HasSuffix(domain, "edu.cn") {
return true
}

for _, v := range setting.Service.EmailDomainWhitelist {
if strings.ToLower(v) == domain {


Loading…
Cancel
Save