[BUGFIX] Move TCA modification of saltedpasswords to TCA/Overrides
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / Configuration / TCA / Overrides / fe_users.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['max'] = 100;
5 if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
6 // Get eval field operations methods as array keys
7 $operations = array_flip(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'], TRUE));
8 // Remove md5 and temporary password from the list of evaluated methods
9 unset($operations['md5'], $operations['password']);
10 // Append new methods to have "password" as last operation.
11 $operations['tx_saltedpasswords_eval_fe'] = 1;
12 $operations['password'] = 1;
13 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
14 unset($operations);
15 }