public function getpinmereqAction() { if ($this->auth->hasIdentity()) { $getpinmereq = new Application_Model_Images($this->registry['DB']); $imageid = $this->getRequest()->getParam('imageid'); $this->view->results = $getpinmereq->getPinMeReq($imageid); echo json_encode(array('status' => 'success')); } else { echo json_encode(array('status' => 'error')); } }