You are here

function openid_user_insert in Drupal 7

Implements hook_user_insert().

File

modules/openid/openid.module, line 86
Implement OpenID Relying Party support for Drupal

Code

function openid_user_insert(&$edit, $account, $category) {
  if (!empty($edit['openid_claimed_id'])) {

    // The user has registered after trying to log in via OpenID.
    if (variable_get('user_email_verification', TRUE)) {
      drupal_set_message(t('Once you have verified your e-mail address, you may log in via OpenID.'));
    }
    user_set_authmaps($account, array(
      'authname_openid' => $edit['openid_claimed_id'],
    ));
    unset($_SESSION['openid']);
    unset($edit['openid_claimed_id']);
  }
}