protected function _actionDelete(AnCommandContext $context)
    {
        $viewer = $this->_state->viewer;
        $person_id = $viewer->id;
        dispatch_plugin('user.onBeforeLogoutPerson', array('person' => $viewer));
        $this->getService('com:people.helper.person')->logout($viewer);
        dispatch_plugin('user.onAfterLogoutPerson', array('id' => $person_id));
        $context->response->setRedirect(route('index.php?'));
    }
protected function _actionDelete(AnCommandContext $context)
    {
        $viewer = $this->_state->viewer;
        $person_id = $viewer->id;
        dispatch_plugin('user.onBeforeLogoutPerson', array('person' => $viewer));
        $this->getService('com:people.helper.person')->logout($viewer);
        dispatch_plugin('user.onAfterLogoutPerson', array('id' => $person_id));
        $context->response->setRedirect(route('index.php?'));
    }
protected function _actionDelete ( AnCommandContext $ context ) { $ viewer = $ this -> _state -> viewer ; $ person_id = $ viewer -> id ; dispatch_plugin ( 'user.onBeforeLogoutPerson' , array ( 'person' => $ viewer ) ) ; $ this -> getService ( 'com:people.helper.person' ) -> logout ( $ viewer ) ; dispatch_plugin ( 'user.onAfterLogoutPerson' , array ( 'id' => $ person_id ) ) ; $ context -> response -> setRedirect ( route ( 'index.php?' ) ) ; }
Deletes a session and logs out the user.

@param AnCommandContext $context Command chain context
Deletes a session and logs out the user .