diff --git a/routes/panel/users.go b/routes/panel/users.go index 54e788d8..20b6f0c8 100644 --- a/routes/panel/users.go +++ b/routes/panel/users.go @@ -35,7 +35,7 @@ func Users(w http.ResponseWriter, r *http.Request, u *c.User) c.RouteError { /*if group == "" { gid = -1 }*/ - hasParam = hasParam && gid > 0 + hasParam = hasParam || gid > 0 page, _ := strconv.Atoi(r.FormValue("page")) perPage := 15 @@ -72,6 +72,9 @@ func Users(w http.ResponseWriter, r *http.Request, u *c.User) c.RouteError { if email != "" { params += "s-email=" + email + "&" } + if gid > 0 { + params += "s-group=" + strconv.Itoa(gid) + "&" + } } pageList := c.Paginate(page, lastPage, 5) pi := c.PanelUserPage{basePage, users, allGroups, search, c.PaginatorMod{template.URL(params), pageList, page, lastPage}}