summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 60c2673d9..93a07134d 100644
--- a/api/user.go
+++ b/api/user.go
@@ -192,6 +192,7 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
}
+// Check that a user's email domain matches a list of space-delimited domains as a string.
func CheckUserDomain(user *model.User, domains string) bool {
if len(domains) == 0 {
return true
@@ -1957,6 +1958,7 @@ func updateUserNotify(c *Context, w http.ResponseWriter, r *http.Request) {
}
}
+// Check if the username is already used by another user. Return false if the username is invalid.
func IsUsernameTaken(name string) bool {
if !model.IsValidUsername(name) {