Moved passwordhash() from yllapito controller to user model, where it belongs

This commit is contained in:
Ismo Vuorinen
2013-07-17 13:57:41 +03:00
parent 78cb7b2eee
commit d3377cf62e
2 changed files with 10 additions and 12 deletions

View File

@@ -175,7 +175,7 @@ class Yllapito extends CI_Controller
$pass = $this->input->post('password');
// Hash the password
$pass = $this->passwordhash($pass);
$pass = $this->users->passwordhash($pass);
$test = array(
'username' => $user,
@@ -227,16 +227,6 @@ class Yllapito extends CI_Controller
public function makePassword($password = null)
{
echo $this->passwordhash($password);
}
private function passwordhash($password = null)
{
return hash(
'ripemd160',
$password . $this->config->item('encryption_key')
);
echo $this->users->passwordhash($password);
}
}