Use new User::filter() function
Optimize the code with no behaviural change