From 8aecdc0411344740d1d13024355895082f6904a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=B6ffler?= Date: Wed, 17 Jun 2015 18:53:28 +0200 Subject: [PATCH] [TASK] Moves TCA override to seperate file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes obsolete parameter in addTCAcolumns() * Removes trim evaluation for password field * Removes saltedpasswords dependency due to having the extension built-in and not uninstallable Resolves: #64208 Change-Id: I665e0920c60de2dec6860a684edb753d157d7545 Reviewed-on: http://review.typo3.org/40375 Reviewed-by: Thomas Löffler Tested-by: Thomas Löffler --- Configuration/TCA/Overrides/be_users.php | 30 ++++++++++++++++++++++++ ext_tables.php | 24 ++----------------- 2 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 Configuration/TCA/Overrides/be_users.php diff --git a/Configuration/TCA/Overrides/be_users.php b/Configuration/TCA/Overrides/be_users.php new file mode 100644 index 0000000..c8c1899 --- /dev/null +++ b/Configuration/TCA/Overrides/be_users.php @@ -0,0 +1,30 @@ + array( + 'exclude' => 0, + 'label' => 'LLL:EXT:be_secure_pw/Resources/Private/Language/locallang.xml:be_users.tx_besecurepw_lastpwchange', + 'config' => array( + 'type' => 'input', + 'size' => 12, + 'eval' => 'datetime', + ) + ), +); + +ExtensionManagementUtility::addTCAcolumns('be_users', $tempColumns); +ExtensionManagementUtility::addToAllTCAtypes('be_users', 'tx_besecurepw_lastpwchange;;;;1-1-1'); \ No newline at end of file diff --git a/ext_tables.php b/ext_tables.php index 2c4547c..226c323 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -3,28 +3,8 @@ die ('Access denied.'); } -$tempColumns = array( - 'tx_besecurepw_lastpwchange' => array( - 'exclude' => 0, - 'label' => 'LLL:EXT:be_secure_pw/Resources/Private/Language/locallang.xml:be_users.tx_besecurepw_lastpwchange', - 'config' => array( - 'type' => 'input', - 'size' => 12, - 'eval' => 'datetime', - ) - ), -); - -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('be_users', $tempColumns, 1); -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('be_users', 'tx_besecurepw_lastpwchange;;;;1-1-1'); - -$TCA['be_users']['columns']['password']['config']['eval'] = 'trim,required,SpoonerWeb\\BeSecurePw\\Evaluation\\PasswordEvaluator,password'; -if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('saltedpasswords')) { - if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('BE')) { - $TCA['be_users']['columns']['password']['config']['eval'] = - 'trim,required,SpoonerWeb\\BeSecurePw\\Evaluation\\PasswordEvaluator,tx_saltedpasswords_eval_be,password'; - } -} +/* set password evaluation for password field in be_users */ +$TCA['be_users']['columns']['password']['config']['eval'] = 'required,SpoonerWeb\\BeSecurePw\\Evaluation\\PasswordEvaluator,tx_saltedpasswords_eval_be,password'; /* override language file */ $TCA_DESCR['_MOD_user_setup']['refs'][] = 'EXT:be_secure_pw/Resources/Private/Language/ux_locallang_csh_mod.xml';