summaryrefslogtreecommitdiff
path: root/system/admin/admin.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-22 02:12:55 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-22 02:12:55 -0700
commita0ea25a4abd67332f7a4a85c91f1490b0274b318 (patch)
tree9970386b1d838d20a93c2229c0bd1fe830ea005e /system/admin/admin.go
parentff15bfb9725e2a295221a346ecd82570f3646238 (diff)
adding initial support to edit and add admin users
Diffstat (limited to 'system/admin/admin.go')
-rw-r--r--system/admin/admin.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/admin/admin.go b/system/admin/admin.go
index 053602c..3beef21 100644
--- a/system/admin/admin.go
+++ b/system/admin/admin.go
@@ -334,6 +334,7 @@ func UsersList(req *http.Request) ([]byte, error) {
return nil, err
}
+ var tmpUsrs []user.User
var usrs []user.User
for i := range jj {
var u user.User
@@ -346,6 +347,13 @@ func UsersList(req *http.Request) ([]byte, error) {
}
}
+ // filter out empty user records
+ for i := range tmpUsrs {
+ if tmpUsrs[i].Email != "" {
+ usrs = append(usrs, tmpUsrs[i])
+ }
+ }
+
// make buffer to execute html into then pass buffer's bytes to Admin
buf := &bytes.Buffer{}
tmpl := template.Must(template.New("users").Parse(html + script))