You are here

function fancy_login_block in Fancy Login 6

Same name and namespace in other branches
  1. 6.2 fancy_login.module \fancy_login_block()

Implementation of hook_block()

File

./fancy_login.module, line 213

Code

function fancy_login_block($op = 'list', $delta = 0, $edit = array()) {
  global $user;
  if ($op == "list") {
    $block = array();
    $block[0]['info'] = t('Fancy Login Link');
    return $block;
  }
  elseif ($op == 'view' && !$user->uid && !$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
    $destination = drupal_get_destination();
    $block['subject'] = t('Login');
    $block['content'] = l(t('Login'), 'user/login');
    return $block;
  }
}