You are here

function _persistent_login_invalidate in Persistent Login 7

Same name and namespace in other branches
  1. 5 persistent_login.module \_persistent_login_invalidate()
  2. 6 persistent_login.module \_persistent_login_invalidate()
7 calls to _persistent_login_invalidate()
persistent_login_cron in ./persistent_login.module
Implements hook_cron().
persistent_login_erase in ./persistent_login.pages.inc
Menu callback to erase a user's Persistent Login records. The menu entry guarantees that the user is logged in.
persistent_login_user_cancel in ./persistent_login.module
Implements hook_user_cancel().
persistent_login_user_logout in ./persistent_login.module
Implements hook_user_logout().
persistent_login_user_presave in ./persistent_login.module
Implements hook_user_presave().

... See full list

File

./persistent_login.module, line 576
Provide a "Remember Me" checkbox in the login form.

Code

function _persistent_login_invalidate($why, $where, $args) {
  if (variable_get('persistent_login_history', 0)) {
    $args2 = $args;
    $args2[':at'] = REQUEST_TIME;
    $args2[':why'] = $why;
    db_query("INSERT INTO {persistent_login_history} (uid, series, token, expires, at, why) SELECT uid, series, token, expires, :at, :why FROM {persistent_login} WHERE " . $where, $args2);
  }
  db_query('DELETE FROM {persistent_login} WHERE ' . $where, $args);
}