summaryrefslogtreecommitdiffstats
path: root/application/models/muser.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-04-01 23:21:37 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-04-01 23:21:37 +0200
commit21dd4864dda1c666ce4adfd29b40e70f70782963 (patch)
treecce776fcaf50e194670781798121dfa8ac0afc59 /application/models/muser.php
parent6df6386694bd10eaf5b4d5682b298765a8b96681 (diff)
Support rehashing of passwords not conforming to config
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/muser.php')
-rw-r--r--application/models/muser.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/application/models/muser.php b/application/models/muser.php
index 8cdc91e6d..c30867e6a 100644
--- a/application/models/muser.php
+++ b/application/models/muser.php
@@ -252,6 +252,12 @@ class Muser extends CI_Model {
));
}
+ public function rehash_password($userid, $password, $hash) {
+ if (password_needs_rehash($hash, $this->hashalgo, $this->hashoptions)) {
+ $this->set_password($userid, $password);
+ }
+ }
+
public function get_upload_id_limits()
{
$userid = $this->get_userid();