2

I am using the LinkedIn Integration module and have created a custom module to add some functionality.

Please see the linkedin.inc file at line 17 - function linkedin_access_token($account)

When a user links their LinkedIn account, I want to add to the db_write_record to also write to a custom field in my database for a timestamp.

Not sure what hook to use since it is a function.

1

Just making a quickly research (I don't have time at this moment to test the code) inside the Linkedin Integration module I can tell you that I found a hook named linkedin_external_login

See the code in the linkedin_auth/linkedin_auth.module file in the line 124

/*
 * Implementation of hook_linkedin_external_login
 */

function linkedin_auth_linkedin_external_login($uid) {
  $name = db_query("SELECT authname FROM {authmap} WHERE uid = :uid AND module = :module", array(':uid' => $uid, ':module' => 'linkedin'))->fetchField();
  user_external_login_register($name, 'linkedin');
  drupal_goto();
}

Just implement your own hook_linkedin_external_login()

| improve this answer | |
  • Hello. Thank you for this information. I am actually using CAS login with LinkedIn Integration (not using LinkedIn for login) to display in profiles only. – GreenLion Jan 28 '16 at 13:27
  • linkedin_profile is the module I am using. – GreenLion Jan 28 '16 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.