[TASK] Rename table cache_extensions
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5
6 t3lib_div::loadTCA('fe_users');
7 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['max'] = 100;
8
9 if (tx_saltedpasswords_div::isUsageEnabled('FE')) {
10
11 // Get eval field operations methods as array keys
12 $operations = array_flip(t3lib_div::trimExplode(',', $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'], TRUE));
13
14 // Remove md5 and temporary password from the list of evaluated methods
15 unset($operations['md5'], $operations['password']);
16
17 // Append new methods to have "password" as last operation.
18 $operations['tx_saltedpasswords_eval_fe'] = 1;
19 $operations['password'] = 1;
20
21 $GLOBALS['TCA']['fe_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
22 unset($operations);
23 }
24
25
26 t3lib_div::loadTCA('be_users');
27 $GLOBALS['TCA']['be_users']['columns']['password']['config']['max'] = 100;
28
29 if (tx_saltedpasswords_div::isUsageEnabled('BE')) {
30
31 // Get eval field operations methods as array keys
32 $operations = array_flip(t3lib_div::trimExplode(',', $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'], TRUE));
33
34 // Remove md5 and temporary password from the list of evaluated methods
35 unset($operations['md5'], $operations['password']);
36
37 // Append new methods to have "password" as last operation.
38 $operations['tx_saltedpasswords_eval_be'] = 1;
39 $operations['password'] = 1;
40
41 $GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', array_keys($operations));
42 unset($operations);
43
44 // Prevent md5 hashing on client side via JS
45 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password']['eval'] = '';
46 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['password2']['eval'] = '';
47 }
48
49 // Add context sensitive help (csh) for scheduler task
50 t3lib_extMgm::addLLrefForTCAdescr('_txsaltedpasswords', 'EXT:' . $_EXTKEY . '/locallang_csh_saltedpasswords.xml');
51 ?>