function _drupal_session_destroy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 modules/memcache/unstable/memcache-session.inc \_drupal_session_destroy()
Called by PHP session handling with the PHP session ID to end a user's session.
Parameters
string $sid: the session id
1 string reference to '_drupal_session_destroy'
- drupal_session_initialize in modules/
memcache/ unstable/ memcache-session.inc - Initialize the session handler, starting a session if needed.
File
- modules/
memcache/ unstable/ memcache-session.inc, line 143
Code
function _drupal_session_destroy($sid) {
dmemcache_delete($sid, 'session');
// Reset $_SESSION and $user to prevent a new session from being started
// in drupal_session_commit().
$_SESSION = array();
$user = drupal_anonymous_user();
// Unset the session cookies.
_drupal_session_delete_cookie(session_name());
}