function shib_auth_form_alter in Shibboleth Authentication 8
Same name and namespace in other branches
- 5.3 shib_auth.module \shib_auth_form_alter()
- 5.2 shib_auth.module \shib_auth_form_alter()
- 6.4 shib_auth.module \shib_auth_form_alter()
- 6 shib_auth.module \shib_auth_form_alter()
- 6.2 shib_auth.module \shib_auth_form_alter()
- 6.3 shib_auth.module \shib_auth_form_alter()
- 7.4 shib_auth.module \shib_auth_form_alter()
Implements hook_form_alter().
File
- ./
shib_auth.module, line 35 - Contains shib_auth.module.
Code
function shib_auth_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form_id != 'user_login_form') {
return;
}
// Add Shibboleth link to form.
$form['shibboleth_login_block'] = [
'#weight' => -10,
'#markup' => '<div class="shibboleth-login">' . shib_auth_get_login_link() . '</div>',
];
}