forked from spoonerWeb/be_secure_pw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
26 lines (22 loc) · 960 Bytes
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
// for editing per "user settings"
$version7 = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('7.0.0');
$currentVersion = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
if ($currentVersion < $version7) {
$saltedPasswordEvaluator = 'tx_saltedpasswords_eval_be';
} else {
$saltedPasswordEvaluator = \TYPO3\CMS\Saltedpasswords\Evaluation\BackendEvaluator::class;
}
/* set password evaluation for password field in be_users */
$evaluation = [
'required',
\SpoonerWeb\BeSecurePw\Evaluation\PasswordEvaluator::class,
$saltedPasswordEvaluator,
'password'
];
$GLOBALS['TCA']['be_users']['columns']['password']['config']['eval'] = implode(',', $evaluation);
/* override language file */
$TCA_DESCR['_MOD_user_setup']['refs'][] = 'EXT:be_secure_pw/Resources/Private/Language/ux_locallang_csh_mod.xml';