Skip to content
Snippets Groups Projects
Commit da147b8f authored by Romain Therville's avatar Romain Therville :coffee:
Browse files

Update to utils.php

The path to the PasswordHashFactory class has been updated with the new
typo3 version. This commit fixes the hash_password() function.

Issue#205
parent 4c740c24
No related branches found
No related tags found
1 merge request!126Merge branch Issue#205 with master
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
//require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('saltedpasswords').'/classes/salts/class.tx_saltedpasswords_salts_factory.php'); //require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('saltedpasswords').'/classes/salts/class.tx_saltedpasswords_salts_factory.php');
class tx_nG6_utils { class tx_nG6_utils {
/** /**
...@@ -298,7 +299,7 @@ $template_mail.='<p>Yours sincerely</p> ...@@ -298,7 +299,7 @@ $template_mail.='<p>Yours sincerely</p>
* @return hashed password * @return hashed password
*/ */
static function hash_password($password){ static function hash_password($password){
$hashInstance = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(PasswordHashFactory::class)->getDefaultHashInstance('FE'); $hashInstance = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::class)->getDefaultHashInstance('FE');
$hashedPassword = $hashInstance->getHashedPassword($password); $hashedPassword = $hashInstance->getHashedPassword($password);
return $hashedPassword; return $hashedPassword;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment