Move querys out of profileinfo controller to the subs

minor  tweaks to the db search as reported at SMF
fix error where pm search by member was not working at all