alter the query of search credentials by user id