Views Block with Arguments

Blocks created by a view in Drupal do not have access to the page URL and thus arguments won't work normally. However, by using some custom PHP code in the argument default setting, we can pass information from the URL to the block as if it were a page.

The best tutorial I was able to find on this is here: Drupal View Block With Arguments

The PHP code I used to get a user's blog to show under his team profile page on this site is below. Used as default argument code for "User: Name."

$path = drupal_get_path_alias($_GET['q']); //get alias of URL
$path = explode('/', $path); //break path into an array
if ($path[0] == 'team' && $path[1] != '') {
  return $path[1];
}