/**
 * Implementation of hook_user_login()
 */
function joc_users_user_login($edit, $account) {
  # Run custom calls if Login by IP is used
  if($account->data['login_by_ip_hook_user_login']) {
    
    # Your custom function calls go here
    # E.g. make calls to Salesforce
    
    // Set this back to disabled so that the above code runs
    // only when Login by Ip module is used.
    $e['data']['login_by_ip_hook_user_login'] = FALSE;

    // Save user
    user_save($account, $e);
  }
}
