Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function checkEqualsOldPassword(string $passwordToCheck, string $oldPasswordHash): bool |
||
32 | { |
||
33 | if (class_exists(PasswordHashFactory::class)) { |
||
34 | $hashInstance = GeneralUtility::makeInstance(PasswordHashFactory::class)->getDefaultHashInstance('FE'); |
||
35 | $equals = $hashInstance->checkPassword( |
||
36 | $passwordToCheck, |
||
37 | $oldPasswordHash |
||
38 | ); |
||
39 | } else { |
||
40 | throw new MissingPasswordHashServiceException( |
||
41 | 'No secure password hashing service could be initialized. Please check your TYPO3 system configuration', |
||
42 | 1557550040 |
||
43 | ); |
||
44 | } |
||
45 | |||
46 | return $equals; |
||
47 | } |
||
49 |