Patches for check_users: improve performance [sf#3373486] [#1156]