You are here

function accountmenu_self_access in Account menu 7

Returns TRUE if the current user can access his own account page.

1 string reference to 'accountmenu_self_access'
accountmenu_menu in ./accountmenu.module
Implements hook_menu.

File

./accountmenu.module, line 66
accountmenu.module Provide a dynamic Log in/My account/Log out account menu

Code

function accountmenu_self_access() {
  global $user;

  // Nothing for a NULL user
  if (empty($user)) {
    return FALSE;
  }
  $router_item = menu_get_item('user/' . $user->uid);
  return !empty($router_item['access']);
}