You are here

function profile2_page_goto in Profile 2 7.2

Re-direct a menu item to path based on the profile base-path.

File

contrib/profile2_page.inc, line 27
Adds separate pages for viewing and editing profiles.

Code

function profile2_page_goto($profile, $sub_path = NULL) {
  $path = profile2_page_get_base_path($profile
    ->type());
  $path .= "/{$profile->uid}";
  if ($sub_path) {
    $path .= "/{$sub_path}";
  }
  drupal_goto($path);
}