diff options
Diffstat (limited to 'application/models/muser.php')
-rw-r--r-- | application/models/muser.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/application/models/muser.php b/application/models/muser.php index 947797034..ced8c5ca2 100644 --- a/application/models/muser.php +++ b/application/models/muser.php @@ -258,7 +258,11 @@ class Muser extends CI_Model { function hash_password($password) { - return password_hash($password, PASSWORD_DEFAULT); + $hash = password_hash($password, PASSWORD_DEFAULT); + if ($hash === false) { + throw new \exceptions\ApiException('user/hash_password/failed', "Failed to hash password"); + } + return $hash; } } |