You are here

function autologout_block in Automated Logout 6.3

Same name and namespace in other branches
  1. 5 autologout.module \autologout_block()
  2. 6.4 autologout.module \autologout_block()
  3. 6 autologout.module \autologout_block()
  4. 6.2 autologout.module \autologout_block()

Implementation of hook_block().

File

./autologout.module, line 119
Used to automagically log out a user after a certain time.

Code

function autologout_block($op = 'list', $delta = 0, $edit = array()) {

  // The $op parameter determines what piece of information is being requested.
  switch ($op) {
    case 'list':
      $blocks['autologout'] = array(
        'info' => t('Automated Logout'),
      );
      return $blocks;
      break;
    case 'view':
      $block = array();
      switch ($delta) {
        case 'autologout':
          $block['subject'] = t('Automated Logout');
          $block['content'] = theme('autologout_block');
          break;
      }
      return $block;
  }
}