Exemplo n.º 1
0
 public function cancelfriendsAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     if ($this->auth->hasIdentity()) {
         $cancelfrd = new Application_Model_Friend($this->registry['DB']);
         $ruserid = $this->getRequest()->getParam('userid');
         $this->view->results = $cancelfrd->cancelFriendsRequest($ruserid);
         echo json_encode(array('status' => 'success'));
     } else {
         echo json_encode(array('status' => 'error'));
     }
 }