How to make disqus load avatar picture instead of user picture? In user profiles I created a field called Avatar with a machine name of field_avatar.

I was wondering if I could make Disqus load the Avatar picture instead of the default Drupal user picture. 

Here is the default Disqus code

        // Load the user's avatar.
    $user_picture_default = variable_get('user_picture_default', '');
    if (isset($account-&gt;picture) &amp;&amp; !empty($account-&gt;picture) &amp;&amp; is_numeric($account-&gt;picture) &amp;&amp; $file = file_load($account-&gt;picture)) {
      $data['avatar'] = !empty($file-&gt;uri) ? $file-&gt;uri : NULL;
    }
    elseif (!empty($user_picture_default)) {
      $data['avatar'] = variable_get('user_picture_default', '');
    }
    if (isset($data['avatar'])) {
      $data['avatar'] = file_create_url($data['avatar']);
    }
  }
  drupal_alter('disqus_user_data', $data);

  return $data;
}
As seen in above code you can use disqus_user_data_alter hook to change disqus data in your custom module...

function YOURMODULENAME_disqus_user_data_alter(&amp;$data) {
  global $user;
  $user_picture_default = variable_get('user_picture_default', '');
if (!empty($user-&gt;field_profile_picture[LANGUAGE_NONE][0]['fid'])) {
  // Load the file -- Change field_profile_picture with your field name
  $file = file_load($user-&gt;field_profile_picture[LANGUAGE_NONE][0]['fid']);

  // Note the style name is "profile_picture" as explained in your question,
  // not "profile_pic" which was in your original code
    $data['avatar'] = !empty($file-&gt;uri) ? $file-&gt;uri : NULL;
  }
  elseif (!empty($user_picture_default)) {
    $data['avatar'] = variable_get('user_picture_default', '');
  }
  if (isset($data['avatar'])) {
      $data['avatar'] = file_create_url($data['avatar']);
  }
}