Revert "[!!!][TASK] Get rid of loadTCA and simplify FE cache behavior"
[Packages/TYPO3.CMS.git] / typo3 / sysext / openid / ext_tables.php
1 <?php
2 // Make sure that we are executed only from the inside of TYPO3
3 if (!defined('TYPO3_MODE')) {
4 die('Access denied.');
5 }
6 // Prepare new columns for be_users table
7 $tempColumns = array(
8 'tx_openid_openid' => array(
9 'exclude' => 0,
10 'label' => 'LLL:EXT:openid/locallang_db.xml:be_users.tx_openid_openid',
11 'config' => array(
12 'type' => 'input',
13 'size' => '30',
14 // Requirement: unique (BE users are unique in the whole system)
15 'eval' => 'trim,nospace,unique'
16 )
17 )
18 );
19 // Add new columns to be_users table
20 \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('be_users');
21 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('be_users', $tempColumns, FALSE);
22 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('be_users', 'tx_openid_openid;;;;1-1-1', '', 'after:username');
23 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('be_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
24 // Prepare new columns for fe_users table
25 $tempColumns['tx_openid_openid']['config']['eval'] = 'trim,nospace,uniqueInPid';
26 // Add new columns to fe_users table
27 \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
28 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns, FALSE);
29 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
30 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
31 // Add field to setup module
32 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_openid_openid'] = array(
33 'type' => 'user',
34 'table' => 'be_users',
35 'label' => 'LLL:EXT:openid/locallang_db.xml:_MOD_user_setup.tx_openid_openid',
36 'csh' => 'tx_openid_openid',
37 'userFunc' => 'EXT:openid/class.tx_openid_mod_setup.php:TYPO3\\CMS\\Openid\\OpenidModuleSetup->renderOpenID',
38 'access' => 'TYPO3\\CMS\\Openid\\OpenidModuleSetup'
39 );
40 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToUserSettings('tx_openid_openid', 'after:password2');
41 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_user_setup', 'EXT:openid/locallang_csh_mod.xml');
42 ?>