1 user.module user_block_view($delta = '', $settings = array())

Implements hook_block_view().

File

core/modules/user/user.module, line 1256
Enables the user registration and login system.

Code

function user_block_view($delta = '', $settings = array()) {
  global $user;
  $block = array();

  switch ($delta) {
    case 'login':
      // For usability's sake, avoid showing two login forms on one page.
      if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {

        $block['subject'] = t('User login');
        $block['content'] = backdrop_get_form('user_login_block');
      }
      return $block;
  }
}