@@ -1,4 +1,4 @@ |
||
| 1 | -<!-- // <?php --> |
|
| 1 | +<!-- // <?php-- > |
|
| 2 | 2 | |
| 3 | 3 | declare(strict_types=1); |
| 4 | 4 | |
@@ -96,7 +96,8 @@ |
||
| 96 | 96 | $passwordEncoder = $this->encoderFactory->getEncoder($mapping); |
| 97 | 97 | |
| 98 | 98 | if ($passwordEncoder->isPasswordValid($mapping->getPass(), $data['pass'], null)) { |
| 99 | - if ($passwordEncoder->needsRehash($mapping->getPass())) { // check to update hash to newer algo |
|
| 99 | + if ($passwordEncoder->needsRehash($mapping->getPass())) { |
|
| 100 | +// check to update hash to newer algo |
|
| 100 | 101 | $this->updatePassword($mapping, $data['pass']); |
| 101 | 102 | } |
| 102 | 103 | |
@@ -69,7 +69,8 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | $passwordEncoder = $this->encoderFactory->getEncoder(AuthenticationMappingEntity::class); |
| 71 | 71 | |
| 72 | - if (empty($user) || $user['uid'] <= 1) { // || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
|
| 72 | + if (empty($user) || $user['uid'] <= 1) { |
|
| 73 | +// || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
|
| 73 | 74 | $this->context |
| 74 | 75 | ->buildViolation($this->trans('Error! Could not login because the user could not be found. Please try again.')) |
| 75 | 76 | ->addViolation(); |
@@ -77,7 +78,8 @@ discard block |
||
| 77 | 78 | $validPassword = false; |
| 78 | 79 | if ($passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
| 79 | 80 | $validPassword = true; |
| 80 | - if ($passwordEncoder->needsRehash($user['pass'])) { // check to update hash to newer algo |
|
| 81 | + if ($passwordEncoder->needsRehash($user['pass'])) { |
|
| 82 | +// check to update hash to newer algo |
|
| 81 | 83 | $this->setPassword((int) $user['uid'], $object['password']); |
| 82 | 84 | } |
| 83 | 85 | } |