function twitter_user_view_alter in Twitter 7.5
Same name and namespace in other branches
- 7.6 twitter.module \twitter_user_view_alter()
Implements hook_user_view_alter()
Adds Twitter account information to the user profile.
File
- ./
twitter.module, line 580 - Provides API integration with the Twitter microblogging service.
Code
function twitter_user_view_alter(&$build) {
$user = $build['#account'];
if (!empty($user->twitter_accounts)) {
$build['twitter'] = array(
'#type' => 'user_profile_item',
'#title' => t('Twitter accounts'),
'#markup' => theme('twitter_user_accounts', array(
'accounts' => $user->twitter_accounts,
)),
'#weight' => 10,
);
}
}