Archived
1
0
Fork 0

app/controllers/UserController.php: in settingsAction() use Phalcon\Security::hash() instead of password_hash()

This commit is contained in:
Henrik Hautakoski 2018-08-10 20:40:04 +02:00
parent 31ac9224b3
commit 2cccbf2f98
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -31,7 +31,7 @@ class UserController extends ControllerBase
$new_pw = $form->getValue('passwordNew');
if (strlen($new_pw) > 0) {
$hash = password_hash($new_pw, PASSWORD_BCRYPT);
$hash = $this->security->hash($new_pw, 12);
// User had a password before. just update.
if (strlen($user->getPassword()) > 0) {