openid_form_user_register_form_alter(&$form, &$form_state)Implements hook_form_alter().
Adds OpenID login to the login forms.
modules/openid/openid.module, line 134
<?php
function openid_form_user_register_form_alter(&$form, &$form_state) {
if (isset($_SESSION['openid']['values'])) {
// We were unable to auto-register a new user. Prefill the registration
// form with the values we have.
$form['account']['name']['#default_value'] = $_SESSION['openid']['values']['name'];
$form['account']['mail']['#default_value'] = $_SESSION['openid']['values']['mail'];
// If user_email_verification is off, hide the password field and just fill
// with random password to avoid confusion.
if (!variable_get('user_email_verification', TRUE)) {
$form['pass']['#type'] = 'hidden';
$form['pass']['#value'] = user_password();
}
$form['openid_display'] = array(
'#type' => 'item',
'#title' => t('Your OpenID'),
'#description' => t('This OpenID will be attached to your account after registration.'),
'#markup' => check_plain($_SESSION['openid']['values']['response']['openid.claimed_id']),
);
}
}
?>