You are here

function hook_disqus_user_data_alter in Disqus 7

Same name and namespace in other branches
  1. 8 disqus.api.php \hook_disqus_user_data_alter()

Modify user data prepared for use with Disqus SSO.

Parameters

array $data:

  • id: User's ID. Used by disqus to uniquely identify the user.
  • username: Display name.
  • email: Email address.
  • url: Link to the user's site profile page.
  • avatar: URI of the user's picture.
1 invocation of hook_disqus_user_data_alter()
disqus_sso_user_data in ./disqus.module
Assembles user-specific data used by Disqus SSO.

File

./disqus.api.php, line 22
Hooks provided by the Disqus module.

Code

function hook_disqus_user_data_alter(&$data) {
  global $user;

  // Integrate with the Real Name module.
  if (isset($user->realname)) {
    $data['username'] = $user->realname;
  }
}