function simplesamlphp_auth_block in simpleSAMLphp Authentication 6.3
Same name and namespace in other branches
- 6.2 simplesamlphp_auth.module \simplesamlphp_auth_block()
Implementation of hook_block().
File
- ./
simplesamlphp_auth.module, line 554 - simpleSAMLphp authentication module for Drupal.
Code
function simplesamlphp_auth_block($op = 'list', $delta = 0, $edit = array()) {
if (!_simplesamlphp_auth_isEnabled()) {
// Exit without executing.
return;
}
if ($op == 'list') {
$blocks = array(
array(
'info' => t('simpleSAMLphp authentication'),
'weight' => 0,
'status' => 0,
'region' => '',
'cache' => BLOCK_NO_CACHE,
),
);
return $blocks;
}
elseif ($op == 'view') {
switch ($delta) {
case 0:
$block = array(
'subject' => t('simpleSAMLphp login'),
'content' => _simplesamlphp_auth_generate_block_text(),
);
break;
}
return $block;
}
}