I had found the proplem, INVO uses stable 2.0.[https://stackoverflow.com/questions/35708732/phalcon-invo-project-register-process-fails]
I am new to Phalcon framework. After I finish filling the register form, and click submit, then I got a white page. There is not anything else error report.
My enviroment is Phalcon 2.1.0.RC1 - Windows x64 for PHP 5.5.0 (vc11) .
Here is th snippet of code:
public function indexAction() { $form = new RegisterForm;
if ($this->request->isPost()) {
//var_dump($this->request);exit;
$name = $this->request->getPost('name', array('string', 'striptags'));
$username = $this->request->getPost('username', 'alphanum');
$email = $this->request->getPost('email', 'email');
$password = $this->request->getPost('password');
$repeatPassword = $this->request->getPost('repeatPassword');
if ($password != $repeatPassword) {
$this->flash->error('Passwords are different');
return false;
}
$user = new Users();
// it seems wrong from here
$user->username = $username;
$user->password = sha1($password);
$user->name = $name;
$user->email = $email;
$user->created_at = new Phalcon\Db\RawValue('now()');
$user->active = 'Y';
// to here
var_dump($user->save());exit;
if ($user->save() == false) {
foreach ($user->getMessages() as $message) {
$this->flash->error((string) $message);
}
} else {
$this->tag->setDefault('email', '');
$this->tag->setDefault('password', '');
$this->flash->success('Thanks for sign-up, please log-in to start generating invoices');
return $this->forward('session/index');
}
//echo 8989898;
}
$this->view->form = $form;
}