mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 05:20:26 +00:00
Canonize user names when reading them
This commit is contained in:
parent
6c49bd7308
commit
4e1115d609
@ -3,6 +3,7 @@ package user
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/bouncepaw/mycorrhiza/cfg"
|
||||
"github.com/bouncepaw/mycorrhiza/util"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
@ -44,6 +45,7 @@ func usersFromFile(path string, source UserSource) (users []*User) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for _, u := range users {
|
||||
u.Name = util.CanonicalName(u.Name)
|
||||
u.Source = source
|
||||
}
|
||||
return users
|
||||
|
Loading…
Reference in New Issue
Block a user