You are here

function profile2_page_own in Profile 2 7.2

Same name and namespace in other branches
  1. 7 contrib/profile2_page.inc \profile2_page_own()

Shows the profile page for the current user.

See also

user_page()

1 string reference to 'profile2_page_own'
profile2_page_menu in contrib/profile2_page.module
Implements hook_menu().

File

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

Code

function profile2_page_own($base_path) {
  global $user;
  if ($user->uid) {
    menu_set_active_item($base_path . '/' . $user->uid);
    return menu_execute_active_handler(NULL, FALSE);
  }
  else {
    return drupal_get_form('user_login');
  }
}