Reorganized the function to take pipeline input of the user objects
 instead of getting the user info itself.