You are here

function shib_auth_form_alter in Shibboleth Authentication 8

Same name and namespace in other branches
  1. 5.3 shib_auth.module \shib_auth_form_alter()
  2. 5.2 shib_auth.module \shib_auth_form_alter()
  3. 6.4 shib_auth.module \shib_auth_form_alter()
  4. 6 shib_auth.module \shib_auth_form_alter()
  5. 6.2 shib_auth.module \shib_auth_form_alter()
  6. 6.3 shib_auth.module \shib_auth_form_alter()
  7. 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>',
  ];
}