You are here

function linkedin_auth_menu in LinkedIn Integration 6

Same name and namespace in other branches
  1. 7 linkedin_auth/linkedin_auth.module \linkedin_auth_menu()

File

linkedin_auth/linkedin_auth.module, line 20
Implement LinkedIn Authentication service for user login

Code

function linkedin_auth_menu() {
  $items = array();

  //callback for oauth token request on linkedin API.
  $items['linkedin/login/%user'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'linkedin_access_token',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'linkedin_auth_token_access',
    'access arguments' => array(
      2,
    ),
    'file' => 'linkedin.inc',
    'file path' => drupal_get_path('module', 'linkedin'),
  );

  //register new user if no account linked
  $items['linkedin/register/create'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'linkedin_auth_register_page',
    ),
    'access callback' => 'user_is_anonymous',
    'type' => MENU_CALLBACK,
    'file' => 'linkedin_auth.pages.inc',
  );
  return $items;
}