Skip to content

Instantly share code, notes, and snippets.

@henrikbjorn
Created March 14, 2009 00:03
Show Gist options
  • Save henrikbjorn/78840 to your computer and use it in GitHub Desktop.
Save henrikbjorn/78840 to your computer and use it in GitHub Desktop.
public function register()
{
$this->View->errors = array();
$this->View->user = new User_Model;
if (request::method() == 'post') {
$this->View->user->load_values($this->input->post());
$this->View->user->password = $this->input->post('password');
if ($this->View->user->validate($this->input->post())) {
$this->View->user->save();
url::redirect('auth/activate');
}
$this->View->errors = $errors;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment