1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00

Canonize user names when reading them

This commit is contained in:
Timur Ismagilov 2021-06-03 18:16:15 +05:00
parent 6c49bd7308
commit 4e1115d609

View File

@ -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