Neos\Flow\Session\SessionManagerInterface::destroySessionsByTag PHP Метод

destroySessionsByTag() публичный Метод

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"
Результат integer Number of sessions which have been destroyed
    public function destroySessionsByTag($tag, $reason = '');

Usage Example

 /**
  * Removes an account
  *
  * @param object $object The account to remove
  * @return void
  * @throws IllegalObjectTypeException
  */
 public function remove($object)
 {
     parent::remove($object);
     /** @var Account $object */
     $tag = 'TYPO3-Flow-Security-Account-' . md5($object->getAccountIdentifier());
     $this->sessionManager->destroySessionsByTag($tag, sprintf('The account %s (%s) was deleted', $object->getAccountIdentifier(), $object->getAuthenticationProviderName()));
 }