function openid_user_insert

Implements hook_user_insert().

File

drupal/core/modules/openid/openid.module, line 93
Implement OpenID Relying Party support for Drupal

Code

function openid_user_insert($account) {
  if (!empty($account->openid_claimed_id)) {

    // The user has registered after trying to log in via OpenID.
    if (config('user.settings')
      ->get('verify_mail')) {
      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' => $account->openid_claimed_id,
    ));
    unset($_SESSION['openid']);
    unset($account->openid_claimed_id);
  }
}