User search

Wrote this up quick, not a great unit test candidate with the way things are setup because of the incredible amount of mocking. The plan was always to cover most of this stuff with Behat tests, the tests as they are at least verify the exception I'm throwing and that there are no syntax errors :hand:
Oops. Forgot this one. `$db` needs to be `$this->db`.