// get the node id for the group
// expecting site urls to be in format group/group-name
// HACK: get the internal (source) url from the first part of the path with arg, expecting to find 'group/group-name'
$group_url = drupal_lookup_path('source', 'group/'.$args[0]);
// extract the group node id
$group_url_exploded = explode('/', $group_url);
$args[0] = $group_url_exploded[1];
return $args;