-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
ext_tables.php
26 lines (21 loc) · 942 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
defined('TYPO3') or die();
use Derhansen\SfYubikey\Hooks\UserSettings;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
call_user_func(function () {
// Add YubiKey fields to user settings
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_sfyubikey_yubikey_enable'] = [
'label' => 'LLL:EXT:sf_yubikey/Resources/Private/Language/locallang_db.xlf:users.tx_sfyubikey_yubikey_enable',
'type' => 'check',
'table' => 'be_users',
];
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_sfyubikey_yubikey_id'] = [
'label' => 'LLL:EXT:sf_yubikey/Resources/Private/Language/locallang_db.xlf:users.tx_sfyubikey_yubikey_id',
'type' => 'user',
'userFunc' => UserSettings::class . '->userYubikeyId',
'table' => 'be_users',
];
ExtensionManagementUtility::addFieldsToUserSettings(
'--div--;YubiKey,tx_sfyubikey_yubikey_enable, tx_sfyubikey_yubikey_id'
);
});