[eluser]bobbob[/eluser]
This is a newbie question no doubt.
When the form validation fails it sends back the inputs of the user.
I don't want to send the sha1 version of the password as if they hit submit again it will sha1 that. Very secure maybe but I doubt very memorable :-)
How to get around this and sha1 after validation?
This is in my register controller.
Db is auto loaded.
Code:
function index()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->form_validation->set_rules('user_name', 'Username', 'trim|required|min_length[3]|max_length[30]|xss_clean|callback_username_check');
$this->form_validation->set_rules('password', 'Password', 'trim|required|sha1');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|callback_email_check');
if ($this->form_validation->run() == FALSE)
{
$this->load->view('registration');
}
else
{
$this->db->insert('members', $_POST);
$this->load->view('reg_success');
}
}
Thanks