You are here

function linkedin_auth_register_form_submit in LinkedIn Integration 6

Same name and namespace in other branches
  1. 7 linkedin_auth/linkedin_auth.module \linkedin_auth_register_form_submit()
1 string reference to 'linkedin_auth_register_form_submit'
linkedin_auth_register_page in linkedin_auth/linkedin_auth.pages.inc
Menu callback. Called when user perform linkedin registration

File

linkedin_auth/linkedin_auth.pages.inc, line 66

Code

function linkedin_auth_register_form_submit($form, &$form_state) {
  user_external_login_register($form_state['values']['name'], 'linkedin');
  global $user;
  $account = user_save($user, $form_state['values']);
  if (!$account) {
    drupal_set_message(t("Error saving user account."), 'error');
    drupal_goto();
  }
  linkedin_access_token($account);
}