added populateUser method to reduce code duplication in three different user.controller methods