Пример #1
0
 protected function _actionDelete(Library\CommandContext $context)
 {
     //Force logout from site only
     $context->request->query->application = array('site');
     //Remove the session from the session store
     $entity = parent::_actionDelete($context);
     if (!$context->response->isError()) {
         // Destroy the php session for this user if we are logging out ourselves
         if ($context->user->getEmail() == $entity->email) {
             $context->user->session->destroy();
         }
     }
     return $entity;
 }
Пример #2
0
 protected function _actionDelete(Library\CommandContext $context)
 {
     $entity = parent::_actionDelete($context);
     $this->getObject('com:users.model.sessions')->email($entity->email)->getRowset()->delete();
     return $entity;
 }