Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function register()
- {
- if(!Auth::instance()->logged_in())
- {
- $captcha = new Captcha();
- if ($_POST)
- {
- /* @var $user_model User_Model */
- $user_model = ORM::factory('user');
- $captcha_result = Validation::factory($_POST)->add_rules('captcha_response', 'required', 'Captcha::valid')->validate();
- $user_model->load_values($_POST);
- $user_model->username = $_POST['email'];
- $user_result = $user_model->validate();
- echo $user_model->_valid;
- die;
- }
- $this->template->subtitle = __('New User');
- $this->template->content = new View('user/register_view');
- $this->template->content->form_data = $this->get_form_data();
- $this->template->content->captcha = $captcha;
- }
- else
- {
- url::redirect('user/home');
- }
- }
Add Comment
Please, Sign In to add comment