You are here

function notifications_account_access in Notifications 7

Menu access callback for user subscriptions

Parameters

$account: User account to which these subscriptions below

$op:

  • maintain = create / delete
  • manage = use the per account administration page
1 string reference to 'notifications_account_access'
notifications_account_menu in notifications_account/notifications_account.module
Implementation of hook_menu()

File

notifications_account/notifications_account.module, line 100
Notifications module - User subscriptions tabs

Code

function notifications_account_access($account, $op = 'maintain') {
  if (user_access('administer notifications') || user_access('manage all subscriptions')) {
    return TRUE;
  }
  else {
    return $account->uid && $GLOBALS['user']->uid == $account->uid && ($op == 'maintain' && user_access('maintain own subscriptions') || $op == 'manage' && user_access('manage own subscriptions'));
  }
}