Fixed user search

User is saved in the tt db as id. So logic of user search changed in
this way