summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/user.php5
-rw-r--r--application/models/muser.php7
2 files changed, 8 insertions, 4 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index c2ddf116b..009e4c90c 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -340,10 +340,7 @@ class User extends MY_Controller {
}
if (empty($error)) {
- $this->db->where('id', $userid)
- ->update('users', array(
- 'password' => $this->muser->hash_password($password)
- ));
+ $this->muser->set_password($userid, $password);
$this->db->where('key', $key)
->delete('actions');
diff --git a/application/models/muser.php b/application/models/muser.php
index 852a7c3e3..8cdc91e6d 100644
--- a/application/models/muser.php
+++ b/application/models/muser.php
@@ -245,6 +245,13 @@ class Muser extends CI_Model {
}
}
+ public function set_password($userid, $password) {
+ $this->db->where('id', $userid)
+ ->update('users', array(
+ 'password' => $this->hash_password($password)
+ ));
+ }
+
public function get_upload_id_limits()
{
$userid = $this->get_userid();