From 21dd4864dda1c666ce4adfd29b40e70f70782963 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 1 Apr 2016 23:21:37 +0200 Subject: Support rehashing of passwords not conforming to config Signed-off-by: Florian Pritz --- application/models/muser.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'application/models/muser.php') 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(); -- cgit v1.2.3-24-g4f1b