[BUGFIX] EXT:saltedpasswords remove dependency on EXT:setup
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['max'] = 100;
6 if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
7 // Get eval field operations methods as array keys
8 $operations = array_flip(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'], TRUE));
9 // Remove md5 and temporary password from the list of evaluated methods
10 unset($operations['md5'], $operations['password']);
11 // Append new methods to have "password" as last operation.
12 $operations['tx_saltedpasswords_eval_fe'] = 1;
13 $operations['password'] = 1;
14 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
15 unset($operations);
16 }
17 $GLOBALS['TCA']['be_users']['columns']['password']['config']['max'] = 100;
18
19 // Backend configuration for saltedpasswords
20 // Get eval field operations methods as array keys
21 $operations = array_flip(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], TRUE));
22 // Remove md5 and temporary password from the list of evaluated methods
23 unset($operations['md5'], $operations['password']);
24 // Append new methods to have "password" as last operation.
25 $operations['tx_saltedpasswords_eval_be'] = 1;
26 $operations['password'] = 1;
27 $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
28 unset($operations);
29 // Add context sensitive help (csh) for scheduler task
30 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_txsaltedpasswords', 'EXT:' . $_EXTKEY . '/locallang_csh_saltedpasswords.xlf');