summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-01-14 08:23:48 -0500
committerJoramWilander <jwawilander@gmail.com>2016-01-14 08:24:09 -0500
commitc26edcf6786fd8aa1535c09e9581fc6417cddda4 (patch)
treed8283b12c2a1b14c18da4ae446f5c2ca0e5d0af5 /api/user.go
parent22c522178ce5a4b9e9533d91dd77518a2899f2b0 (diff)
downloadchat-c26edcf6786fd8aa1535c09e9581fc6417cddda4.tar.gz
chat-c26edcf6786fd8aa1535c09e9581fc6417cddda4.tar.bz2
chat-c26edcf6786fd8aa1535c09e9581fc6417cddda4.zip
Final updates
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