Can't sort by phone nor nodes count

Fixed sort by phone number and nodes count when performing an advanced
search on users.
Fixes #1738