function masquerade_block_view

cis7 masquerade.module masquerade_block_view($delta = '')
cle7 masquerade.module masquerade_block_view($delta = '')
elmsmedia7 masquerade.module masquerade_block_view($delta = '')
icor7 masquerade.module masquerade_block_view($delta = '')
meedjum_blog7 masquerade.module masquerade_block_view($delta = '')
mooc7 masquerade.module masquerade_block_view($delta = '')

Implements hook_block_view().

File

sites/all/modules/ulmus/masquerade/masquerade.module, line 568
The masquerade module allows administrators to masquerade as other user.

Code

function masquerade_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    case 'masquerade':
      if (isset($_SESSION['masquerading']) || (user_access('masquerade as user') || user_access('masquerade as admin'))) {
        $block['subject'] = t('Masquerade');
        $block['content'] = drupal_get_form('masquerade_block_1');
      }
      break;
  }
  return $block;
}