Previously when $gid was empty the users were not filtered at all. Rendering the search function in the user management pretty useless. Fixes itself