You are here

function campaignmonitor_user_page_access in Campaign Monitor 6.3

Access callback for the user newsletters page.

1 string reference to 'campaignmonitor_user_page_access'
campaignmonitor_menu in ./campaignmonitor.module
Implementation of hook_menu().

File

./campaignmonitor.module, line 94
Module that plugs in Campaign Monitor functionality to your Drupal web site. For Campaign Monitor information see: http://www.campaignmonitor.com/

Code

function campaignmonitor_user_page_access($account) {
  global $user;
  $display_on = variable_get(CM_DISPLAY_ON, array());
  if ($display_on['userpage'] && $user->uid && $user->uid == $account->uid && user_access('join newsletter')) {
    return TRUE;
  }
  return FALSE;
}