[eluser]Loquela[/eluser]
Hi there,
For some reason, the md5 is not converting the email input and the data is submitted as plan text. Everything elseworks, validation is working - I'm sent back to the form on falure and the data is inserted on success. Just the md5 function in the password field doesn't seem to be doing anything.
Any ideas?
Cheers
Code:
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'matches[passconf]|md5');
$this->form_validation->set_rules('passconf', 'Retype password');
$this->form_validation->set_rules('firstname', 'Firstname', 'required');
$this->form_validation->set_rules('lastname', 'lastname', 'required');
$this->form_validation->set_rules('email', 'Email', 'required|valid_email');
$data = array(
'username' =>$this->input->post('username'),
'password' =>$this->input->post('password'),
'firstname' =>$this->input->post('firstname'),
'lastname' =>$this->input->post('lastname'),
'email' =>$this->input->post('email'),
'updated' =>$this->input->post('updated'),
);
if($this->form_validation->run()==FALSE)
{
$this->update_admin_form($data);
}
else
{
$this->users_model->update_user($data);
$this->update_admin_form($data);
}
}