You are here

function bakery_user_update in Bakery Single Sign-On System 7.4

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

Implements hook_user_update().

File

./bakery.module, line 229

Code

function bakery_user_update(&$edit, $account, $category) {
  global $user;
  if (variable_get('bakery_is_master', 0) && isset($_SESSION['bakery'])) {
    if ($user->uid === $account->uid) {

      // Rebake SSO cookie so user stays authenticated.
      $init = _bakery_init_field($account->uid);
      _bakery_bake_chocolatechip_cookie($account->name, $account->mail, $init);
    }
  }
}