Added contact logs getter function
Created universal getter function
Refactored get user by id to use universal getter