You are here

function commons_trusted_contacts_tab_access in Drupal Commons 7.3

Access callback for trusted contacts related pages;

1 string reference to 'commons_trusted_contacts_tab_access'
commons_trusted_contacts_menu in modules/commons/commons_trusted_contacts/commons_trusted_contacts.module
Implements hook_menu().

File

modules/commons/commons_trusted_contacts/commons_trusted_contacts.module, line 134

Code

function commons_trusted_contacts_tab_access($account) {
  global $user;
  if (user_access('administer group')) {

    // Admin user.
    return TRUE;
  }
  if ($user->uid == $account->uid) {

    // User's own pages.
    return TRUE;
  }
  return FALSE;
}