Implement query user functions