summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 786414227..a6b4fb654 100644
--- a/api/user.go
+++ b/api/user.go
@@ -142,6 +142,10 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
}
func CheckUserDomain(user *model.User, domains string) bool {
+ if len(domains) == 0 {
+ return true
+ }
+
domainArray := strings.Fields(strings.TrimSpace(strings.ToLower(strings.Replace(strings.Replace(domains, "@", " ", -1), ",", " ", -1))))
matched := false