function shib_auth_block in Shibboleth Authentication 6.4
Same name and namespace in other branches
- 5.3 shib_auth.module \shib_auth_block()
- 5.2 shib_auth.module \shib_auth_block()
- 6 shib_auth.module \shib_auth_block()
- 6.2 shib_auth.module \shib_auth_block()
- 6.3 shib_auth.module \shib_auth_block()
Generate the HTML text for the shib_auth login block
@returns block HTML
Parameters
op the operation from the URL:
delta offset:
File
- ./
shib_auth.module, line 935 - Drupal Shibboleth authentication module.
Code
function shib_auth_block($op = 'list', $delta = 0, $edit = array()) {
// listing of blocks, such as on the admin/block page
switch ($op) {
case 'list':
$blocks[0] = array(
'info' => t('Shibboleth authentication'),
'status' => TRUE,
'visibility' => 1,
'weight' => 0,
'region' => 'left',
);
return $blocks;
case 'configure':
$form = array();
switch ($delta) {
case 0:
$form['shib_auth_link_text'] = array(
'#type' => 'textfield',
'#title' => t('Text of the auth link'),
'#require' => TRUE,
'#size' => 60,
'#description' => t('Here you can replace the text of the authentication link.'),
'#default_value' => shib_auth_config('link_text'),
);
}
return $form;
case 'save':
switch ($delta) {
case 0:
variable_set('shib_auth_link_text', $edit['shib_auth_link_text']);
}
break;
case 'view':
default:
switch ($delta) {
case 0:
$block = array(
'subject' => t('Shibboleth login'),
'content' => _login_url_html(),
);
break;
}
return $block;
}
}