You are here

function sf_user_menu in Salesforce Suite 5.2

Same name and namespace in other branches
  1. 6.2 sf_user/sf_user.module \sf_user_menu()

Implementation of hook_menu().

File

sf_user/sf_user.module, line 12
Integrates the core user object and profile module with the Salesforce API.

Code

function sf_user_menu($may_cache) {
  $items = array();
  if (arg(0) == 'user' && is_numeric(arg(1)) && user_access('sync users with salesforce')) {
    $items[] = array(
      'path' => 'user/' . arg(1) . '/salesforce',
      'title' => t('Salesforce'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'sf_user_salesforce_form',
        arg(1),
      ),
      'access' => user_access('sync users with salesforce'),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}