[ticket/12426] Rework of user search

Injecting DB object to requested function

PHPBB3-12426