add filter to hide special account in user list (#2522)

This commit is contained in:
aynsix
2018-03-15 20:04:29 +04:00
committed by jygaulier
parent 314473b169
commit ed29948a33
3 changed files with 9 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ class Manage extends Helper
'sbas_id' => $this->request->get('sbas_id'),
'base_id' => $this->request->get('base_id'),
'last_model' => $this->request->get('last_model'),
'show_special_users' => $this->request->get('show_special_users') ? true : false,
'srt' => $this->request->get("srt", \User_Query::SORT_CREATIONDATE),
'ord' => $this->request->get("ord", \User_Query::ORD_DESC),
'per_page' => $results_quantity,
@@ -109,6 +110,7 @@ class Manage extends Helper
->last_model_is($this->query_parms['last_model'])
->get_inactives($this->query_parms['inactives'])
->include_templates(true)
->include_special_users($this->query_parms['show_special_users'])
->on_bases_where_i_am($this->app->getAclForUser($this->app->getAuthenticatedUser()), [\ACL::CANADMIN])
->limit($offset_start, $results_quantity)
->execute();

View File

@@ -812,7 +812,7 @@ class User_Query
WHERE 1 ';
if (! $this->include_special_users) {
$sql .= ' AND Users.login != "autoregister" AND Users.login != "invite" ';
$sql .= ' AND Users.login != "autoregister" AND Users.login NOT LIKE "guest%" ';
}
$sql .= ' AND Users.deleted="0" ';