public function onStorageEventPreDelete(StorageEvent $event)
    {
        /** @var Entity\Users $userEntity */
        $userEntity = $event->getContent();
        if (!$userEntity instanceof Entity\Users) {
            return;
        }

        $this->deleteAuthtokens($userEntity);
        $this->deleteSessions($userEntity);
    }
public function onStorageEventPreDelete(StorageEvent $event)
    {
        /** @var Entity\Users $userEntity */
        $userEntity = $event->getContent();
        if (!$userEntity instanceof Entity\Users) {
            return;
        }

        $this->deleteAuthtokens($userEntity);
        $this->deleteSessions($userEntity);
    }
public function onStorageEventPreDelete ( StorageEvent $ event ) { /** @var Entity\Users $userEntity */ $ userEntity = $ event -> getContent ( ) ; if ( ! $ userEntity instanceof Entity \ Users ) { return ; } $ this -> deleteAuthtokens ( $ userEntity ) ; $ this -> deleteSessions ( $ userEntity ) ; }
Remove sessions & authtokens when a user is deleted.

@param StorageEvent $event
Remove sessions & authtokens when a user is deleted .