public function SessionLimit::onSessionCollision in Session Limit 8
Same name and namespace in other branches
- 2.x src/Services/SessionLimit.php \Drupal\session_limit\Services\SessionLimit::onSessionCollision()
React to a collision event.
The user has more sessions than they are allowed. Depending on the configured behaviour of the module we will either drop existing sessions, prevent this new session or ask the user what to do.
Parameters
SessionLimitCollisionEvent $event:
File
- src/
Services/ SessionLimit.php, line 241
Class
Namespace
Drupal\session_limit\ServicesCode
public function onSessionCollision(SessionLimitCollisionEvent $event) {
switch ($this
->getCollisionBehaviour()) {
case self::ACTION_ASK:
$this
->_onSessionCollision__Ask();
break;
case self::ACTION_PREVENT_NEW:
$this
->_onSessionCollision__PreventNew($event);
break;
case self::ACTION_DROP_OLDEST:
$this
->_onSessionCollision__DropOldest($event);
break;
}
}