Hello,
I think the new version’s registration does not work. I am using the code from your website:
$this->load->library('validation');
$val = $this->validation;
$rules['username'] = "trim|required|xss_clean|min_length[5]|max_length[25]|username_check|username_start|alpha_dash";
$rules['password'] = "trim|required|xss_clean|min_length[6]|matches[password_confirm]";
$rules['password_confirm'] = 'trim|required|xss_clean';
$rules['email'] = 'trim|required|xss_clean|valid_email|email_check';
$rules['captcha_code'] = 'trim|xss_clean';
$val->set_rules($rules);
$fields['username'] = 'Username';
$fields['password'] = 'Password';
$fields['password_confirm'] = 'Confirm Password';
$fields['email'] = 'Email';
$fields['captcha_code'] = 'Captcha Code';
$val->set_fields($fields);
if ( $val->run() === TRUE AND $this->cl_auth->register($val))
{
redirect("user");
}
else
{
$this->load->view("register");
}
But I receive errors
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'Object', '$1$Tz0a59Xa$YVaJYPu0wYk.DQWHgNwXb.', NULL, '2008-12-19 11:16:53')' at line 1
INSERT INTO `cl_users` (`user_ip`, `username`, `username_clean`, `password`, `email`, `created`) VALUES ('99.240.35.85', , 'Object', '$1$Tz0a59Xa$YVaJYPu0wYk.DQWHgNwXb.', NULL, '2008-12-19 11:16:53')
Now I noticed in the library that you need username, password and email but if I use it directly then the form does not validate.
Would appreciate the help.
Thanks.