Using the Profile2 module, how to access contextual information to place a views block on profile page? I'm trying to add a list of author's content to a profile2 page. The profile page is separate from the user account page so I can't use get UID from URL option.
Using the View Default Argument From Context Module I added this code to it.

function views_arg_context_profile2_view($entity, $view_mode, $langcode) {
  context_set('user', 'uid', $entity-&gt;uid);
  context_set('profile', 'pid', $entity-&gt;pid);
}


Now there is an option in Views Default Argument to pull the ID from context and I place either user or profile in the appropriate text field and it works fine.