Use default user for metadata

This commit is contained in:
scs 2019-07-25 22:23:20 +00:00
parent 1140a07d43
commit 4ca36d90de
1 changed files with 8 additions and 0 deletions

View File

@ -227,6 +227,14 @@ func GetMeta(username string, metakey string) string {
if err != nil {
log.Printf("scsusers.GetMeta: %s - %s - %s\n", username, metakey, err.Error())
}
if v=="" {
// get default user
err:=c.db.Get(&v, q, "//default//", metakey)
if err != nil {
log.Printf("scsusers.GetMeta: %s - %s - %s\n", username, metakey, err.Error())
}
}
return v
}