[eluser]Unknown[/eluser]
Hi guys, I hope you can help me,
I am in the process of changing our membership structure over but the original code has the members passwords encrypted using the following.
function prep_password($password)
{
return sha1($password . $this->config->item('encryption_key'));
}
I would like to using the following, input boxes for members to update their password, and just struggling to get the encyption to match withy existing password,
public function add_user()
{
$data=array(
'username'=>$this->input->post('user_name'),
'email'=>$this->input->post('email_address'),
'password'=>sha1($this->input->post('password', TRUE))
//$password => $this->input->post('password '),
);
$this->db->insert('userTest',$data);
Any help would be much appreciated.
Cheers