Neos\Flow\Session\SessionManager::destroySessionsByTag PHP Method

destroySessionsByTag() public method

Destroys all sessions which are tagged with the specified tag.
public destroySessionsByTag ( string $tag, string $reason = '' ) : integer
$tag string A valid Cache Frontend tag
$reason string A reason to mention in log output for why the sessions have been destroyed. For example: "The corresponding account was deleted"
return integer Number of sessions which have been destroyed
    public function destroySessionsByTag($tag, $reason = '')
    {
        $sessions = $this->getSessionsByTag($tag);
        foreach ($sessions as $session) {
            /** @var SessionInterface $session */
            $session->destroy($reason);
        }
        return count($sessions);
    }