function _persistent_login_invalidate in Persistent Login 6
Same name and namespace in other branches
- 5 persistent_login.module \_persistent_login_invalidate()
- 7 persistent_login.module \_persistent_login_invalidate()
5 calls to _persistent_login_invalidate()
- persistent_login_cron in ./
persistent_login.module - Implementation of 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 in ./
persistent_login.module - Implementation of hook_user().
- _persistent_login_check in ./
persistent_login.module - _persistent_login_check(). Do the real work. Note that we may be in BOOTSTRAP_PAGE_CACHE mode with few modules loaded.
- _persistent_login_create_cookie in ./
persistent_login.module - Create a Persistent Login cookie.
File
- ./
persistent_login.module, line 527 - Provide a "Remember Me" checkbox in the login form.
Code
function _persistent_login_invalidate($why, $where) {
$vals = func_get_args();
array_shift($vals);
array_shift($vals);
// This is currently only for debugging but could be an audit log.
if (variable_get('persistent_login_history', 0)) {
$vals2 = $vals;
array_unshift($vals2, time(), $why);
db_query("INSERT INTO {persistent_login_history} (uid, series, token, expires, at, why) SELECT uid, series, token, expires, %d, '%s' FROM {persistent_login} WHERE " . $where, $vals2);
}
db_query('DELETE FROM {persistent_login} WHERE ' . $where, $vals);
}