This commit is contained in:
parent
b46a173a85
commit
3b34e53a8e
|
@ -24,6 +24,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
@ -337,11 +338,11 @@ func addUser(username, password, email string) string {
|
||||||
defer addUserMutex.Unlock()
|
defer addUserMutex.Unlock()
|
||||||
|
|
||||||
for _, user := range conf.Users {
|
for _, user := range conf.Users {
|
||||||
if user.Name == username {
|
if strings.ToLower(user.Name) == strings.ToLower(username) {
|
||||||
return userExists
|
return userExists
|
||||||
}
|
}
|
||||||
|
|
||||||
if user.Email == email {
|
if strings.ToLower(user.Email) == strings.ToLower(email) {
|
||||||
return emailExists
|
return emailExists
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue