public function indexAction() { if ($this->_auth->hasIdentity()) { $records = new Application_Model_Records(); $this->view->records = $records->getByIdentity($this->_auth->getIdentity()); $this->view->graph_data = Zend_Json::encode($records->getGraphData($this->_auth->getIdentity())); $this->view->count = count($this->view->records); $this->view->email = $this->_auth->getIdentity(); } $this->view->hasIdentity = $this->_auth->hasIdentity(); }
public function createAction() { if (!$this->_auth->hasIdentity()) { return; } if (!$this->getRequest()->isPost()) { return; } if (!($query = $this->_getParam('query'))) { return; } $records = new Application_Model_Records(); $records->create($query, $this->_auth->getIdentity()); }