You are here

function masquerade_block_view in Masquerade 7

Implements hook_block_view().

File

./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;
}