You are here

function linkedin_token_access in LinkedIn Integration 7

Same name and namespace in other branches
  1. 6 linkedin.module \linkedin_token_access()

@todo Please document this function.

See also

http://drupal.org/node/1354

1 string reference to 'linkedin_token_access'
linkedin_menu in ./linkedin.module
@todo Please document this function.

File

./linkedin.module, line 78

Code

function linkedin_token_access($account) {
  global $user;
  if ($account->uid > 0 && $account->uid == $user->uid) {
    return TRUE;
  }
  if (variable_get('linkedin_debug_mode', 0) == 1) {
    drupal_set_message(t('LinkedIn debug : Access denied to /linkedin/token/@requested. Requesting user has uid @requesting, which is different from the requested account.', array(
      '@requested' => $account->uid,
      '@requesting' => $user->uid,
    )), 'warning');
  }
  return FALSE;
}