function shib_auth_form_alter in Shibboleth Authentication 6.4
Same name and namespace in other branches
- 8 shib_auth.module \shib_auth_form_alter()
- 5.3 shib_auth.module \shib_auth_form_alter()
- 5.2 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()
Alters user_login form for the shibboleth authentication module.
Parameters
$form The form.:
$form_state contains all of the data of the form:
$form_id The form ID.:
File
- ./
shib_auth.module, line 1002 - Drupal Shibboleth authentication module.
Code
function shib_auth_form_alter(&$form, &$form_state, $form_id) {
global $user;
if ($form_id == 'user_login') {
$form['shibboleth'] = array(
'#type' => 'markup',
'#weight' => -20,
'#value' => _login_url_html(),
);
}
if ($form_id == 'user_profile_form' && $form['#parameters'][2]->uid == $user->uid) {
$form['shibboleth'] = array(
'#type' => 'markup',
'#weight' => -1,
'#value' => _login_url_html(TRUE),
);
}
if ($form_id == 'user_admin_role') {
shib_auth_generate_rolenames(TRUE);
}
}