diff --git a/tweetbutton.module b/tweetbutton.module index 400cf0b..5d00bb8 100644 --- a/tweetbutton.module +++ b/tweetbutton.module @@ -317,12 +317,12 @@ function tweetbutton_block_info() { * Implementation of hook_block_configure */ function tweetbutton_block_view($delta = '') { - if ($delta == 'tweetbutton_tweet') { + if ($delta == 'tweetbutton_tweet' && user_access('access tweetbutton')) { $block['subject'] = t('Tweetbutton tweet'); $block['content'] = theme('tweetbutton_tweet_display'); return $block; } - elseif ($delta == 'tweetbutton_follow') { + elseif ($delta == 'tweetbutton_follow' && user_access('access tweetbutton')) { $block['subject'] = t('Tweetbutton follow'); $block['content'] = theme('tweetbutton_follow_display'); return $block; @@ -475,4 +475,4 @@ function theme_tweetbutton_hashtag_display($variables) { $hash_link = l($hash_text, 'http://twitter.com/intent/tweet', array('query' => $query, 'attributes' => $attributes, 'external' => TRUE, 'https' => TRUE)); return '
'; -} \ No newline at end of file +}