public function find($id, Application_Model_Register $user) { $result = $this->getDbTable()->find($id); if (0 == count($result)) { return; } $row = $result->current(); $user->setEmail($row->email)->setUsername($row->username)->setFullname($row->fullname)->setAddress($row->address)->setImage($row->image); return $row->toArray(); }
public function saveAction() { if ($this->getRequest()->isPost()) { $database_object = new Application_Model_Register(); $formData = $this->_request->getPost(); $form = new Application_Form_Register(); $this->view->form = $form; if ($form->isValid($formData)) { if (!strlen($formData['username']) || !strlen($formData['password'])) { $this->_redirect('/index/'); return false; } if ($formData['password'] != $formData['password2']) { $this->_redirect('/index/'); return false; } else { unset($formData['password2']); unset($formData['register']); $database_object->insert('users', $formData); $this->_helper->redirector('index', 'Login'); } } } }
public function getAction() { $register = new Application_Model_Register(); $select = $register->getUser(); }