public function SessionProxy_Storage_Database::destroyFor in Session Proxy 7
Destroy all known sessions using the given conditions.
This function implementation is optional, garbage collector should be enough for session destruction in most cases.
Implement this function will only improve performances, it is important that it should remain silent if you cannot handle the given parameters.
Parameters
string $index: Potential session index key, such as 'uid'.
mixed $value: Potential session index value, such as an integer for 'uid'.
Overrides SessionProxy_Storage_Interface::destroyFor
File
- lib/
SessionProxy/ Storage/ Database.php, line 98
Class
Code
public function destroyFor($index, $value) {
if ('uid' == $index) {
db_delete('sessions')
->condition($index, $value)
->execute();
}
}