You are here

function bakery_user_login in Bakery Single Sign-On System 7.3

Same name and namespace in other branches
  1. 8.2 bakery.module \bakery_user_login()
  2. 7.4 bakery.module \bakery_user_login()
  3. 7.2 bakery.module \bakery_user_login()

Implements hook_user_login().

File

./bakery.module, line 113

Code

function bakery_user_login(&$edit, $account) {
  if (variable_get('bakery_is_master', 0) && isset($account->uid)) {
    $bakery = bakery_get_bakery();

    // Create SSO cookie.
    $params = array(
      'name' => $account->name,
      'mail' => $account->mail,
      'init' => _bakery_init_field($account->uid),
      'uid' => $account->uid,
    );
    $bakery
      ->setSsoCookie($params);
  }
}