function ctools_user_login_pane_render

cis7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
cle7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
elmsmedia7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
icor7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
meedjum_blog7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
mooc7 block.inc ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts)
1 string reference to 'ctools_user_login_pane_render'
user_ctools_block_info in sites/all/modules/ulmus/ctools/plugins/content_types/block/block.inc

File

sites/all/modules/ulmus/ctools/plugins/content_types/block/block.inc, line 499
Provide Drupal blocks as content.

Code

function ctools_user_login_pane_render($subtype, $conf, $panel_args, $contexts) {
  list($module, $delta) = _ctools_block_get_module_delta($subtype, $conf);

  // The login form is only visible to anonymous users.
  global $user;
  if ($user->uid) {
    return;
  }

  $info = new stdClass;
  $info->module = $module;
  $info->delta = $delta;

  $block = array();
  $block['subject'] = t('User login');
  // Manually set the content (rather than invoking block_view) because the
  // block implementation won't render on certain URLs.
  $block['content'] = drupal_get_form('user_login_block');

  // Allow modules to modify the block before it is viewed, via either
  // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
  drupal_alter(array('block_view', "block_view_{$module}_{$delta}"), $block, $info);
  $block = (object) $block;

  if (empty($block)) {
    return;
  }

  $block->module = $module;
  $block->delta = $delta;

  // $block->title is not set for the blocks returned by block_block() (the
  // Block module adds the title in block_list() instead), so we look it up
  // manually, unless the title is overridden and does not use the %title
  // placeholder.
  if ($module == 'block') {
    $block->title = $info->title;
  }
  else if (isset($block->subject)) {
    $block->title = $block->subject;
  }
  else {
    $block->title = NULL;
  }

  if (isset($block->subject)) {
    $block->title = $block->subject;
  }
  else {
    $block->title = NULL;
  }

  if (user_access('administer blocks')) {
    $block->admin_links = array(
      array(
        'title' => t('Configure block'),
        'href' => "admin/structure/block/manage/$module/$delta/configure",
        'query' => drupal_get_destination(),
      ),
    );
  }

  return $block;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.