Displaying Organic Group members based on a Views Contextual Filter
Okay so the problem turned out I was returning the wrong variable. 

I needed to return $handler->argument instead of whatever variable I was using. 

So my function I put in my contextual filter was:

if(arg(0) == 'groups' &amp;&amp; arg(1) != null){
  $node_path = drupal_get_normal_path('groups/'.arg(1));

  $node_id = substr($node_path, 5);

  // Check if node referenced by arg(1) is a group
  if(og_is_group('node', $node_id)){
   // return $node_id;
   $handler-&gt;argument = $node_id;
   $node = node_load($node_id);
   $handler-&gt;validated_title = $node-&gt;title;
   return $handler-&gt;argument;
  }
  else {
    return null;
  }
}
else{
  return null;
}


(I cleaned up the code a little and adjusted it to strip out the unnecessary stuff.)