function simplesamlphp_auth_form_alter in simpleSAMLphp Authentication 6.3
Same name and namespace in other branches
- 6.2 simplesamlphp_auth.module \simplesamlphp_auth_form_alter()
- 7.3 simplesamlphp_auth.module \simplesamlphp_auth_form_alter()
- 7 simplesamlphp_auth.module \simplesamlphp_auth_form_alter()
- 7.2 simplesamlphp_auth.module \simplesamlphp_auth_form_alter()
Implementation of hook_form_alter().
File
- ./
simplesamlphp_auth.module, line 536 - simpleSAMLphp authentication module for Drupal.
Code
function simplesamlphp_auth_form_alter(&$form, $form_state, $form_id) {
if (!_simplesamlphp_auth_isEnabled()) {
// Exit without executing.
return;
}
if ($form_id == 'user_login_block') {
$link = l('Federated Login', 'saml_login');
$links = $form['links']['#value'];
$links = str_replace('</ul>', '<li class="saml">' . $link . '</li></ul>', $links);
$form['links']['#value'] = $links;
}
}