public function changeProfileAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $ctype = $this->getRequest()->getParam('ctype'); $id = $this->getRequest()->getParam('id'); $userid = $this->getRequest()->getParam('userid'); $friendid = $this->getRequest()->getParam('friendid'); $params['id'] = $id; //$params['friendId']=$id; $params['userId'] = $userid; $params['friendId'] = $friendid; $params['status'] = 'accept'; $params['connectionType'] = $ctype; $friendm = new Application_Model_Friend($params); $friend = $friendm->save(); }
public function acceptFAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $params = $this->getRequest()->getParams(); $id = $params['id']; $friendM = new Application_Model_Friend(); $friendM = $friendM->find($id); $friendM->setStatus('accept'); $friendM->save(); $fdata['friendId'] = $friendM->getUserId(); $fdata['userId'] = $friendM->getFriendId(); $fdata['connectionType'] = $friendM->getConnectionType(); $fdata['status'] = 'accept'; //print_r($fdata);exit; $friendM = new Application_Model_Friend($fdata); $friendM->save(); //set session and redirect user $_SESSION['session_error_msg'] = "accept"; $this->_redirect($this->view->seoUrl('/gapper/my-messages/')); }