public function MongodbSessionManager::delete in MongoDB 8
Ends a specific user's session(s).
Parameters
int $uid: User ID.
Overrides SessionManager::delete
File
- mongodb_user/
src/ MongodbSessionManager.php, line 30 - Contains \Drupal\mongodb_user\MongodbSessionManager.
Class
Namespace
Drupal\mongodb_userCode
public function delete($uid) {
// Nothing to do if we are not allowed to change the session.
if (!$this->writeSafeHandler
->isSessionWritable() || $this
->isCli()) {
return;
}
$this->mongo
->get('sessions')
->remove(array(
'uid' => (int) $uid,
));
}