You are here

function bakery_eat_thinmint_cookie in Bakery Single Sign-On System 6.2

Update the user's login time to reflect them validating their email address.

1 string reference to 'bakery_eat_thinmint_cookie'
bakery_menu in ./bakery.module
Implementation of hook_menu().

File

./bakery.module, line 1326

Code

function bakery_eat_thinmint_cookie() {

  // Session was set in validate.
  $name = $_SESSION['bakery']['name'];
  unset($_SESSION['bakery']['name']);
  $slave = $_SESSION['bakery']['slave'];
  unset($_SESSION['bakery']['slave']);
  $uid = $_SESSION['bakery']['uid'];
  unset($_SESSION['bakery']['uid']);
  $account = user_load(array(
    'name' => $name,
  ));
  if ($account) {
    db_query("UPDATE {users} SET login = %d WHERE uid = %d", $_SERVER['REQUEST_TIME'], $account->uid);

    // Save UID provided by slave site.
    _bakery_save_slave_uid($account, $slave, $uid);
  }
}