Exemplo n.º 1
0
 public function deleteProfileAction()
 {
     $id = $this->getRequest()->getParam('id');
     $friendm = new Application_Model_Friend();
     $userdata = $friendm->find($id);
     $userId = $userdata->getUserId();
     $friendId = $userdata->getFriendId();
     $friendm->delete("id = {$id}");
     $friendm->delete("user_id = {$friendId} and friend_id={$userId}");
     $this->_redirect('/gapper/my-friends');
 }
Exemplo n.º 2
0
 public function declineAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $params = $this->getRequest()->getParams();
     $id = $params['id'];
     $friendM = new Application_Model_Friend();
     $friendM->delete("id = {$id}");
     //set session and redirect user
     $_SESSION['session_error_msg'] = "decline";
     $this->_redirect($this->view->seoUrl('/gapper/my-messages/'));
 }