[TASK] Merge submodule workspaces into core
[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 if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('BE')) {
19 // Get eval field operations methods as array keys
20 $operations = array_flip(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], TRUE));
21 // Remove md5 and temporary password from the list of evaluated methods
22 unset($operations['md5'], $operations['password']);
23 // Append new methods to have "password" as last operation.
24 $operations['tx_saltedpasswords_eval_be'] = 1;
25 $operations['password'] = 1;
26 $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
27 unset($operations);
28 // Prevent md5 hashing on client side via JS
29 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password']['eval'] = '';
30 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password2']['eval'] = '';
31 }
32 // Add context sensitive help (csh) for scheduler task
33 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_txsaltedpasswords', 'EXT:' . $_EXTKEY . '/locallang_csh_saltedpasswords.xml');
34 ?>