Fixed bug #11932: OpenID login does uses cURL even if was not defined in TYPO3_CONF_VARS
[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
7 // Prepare new columns for be_users table
8 $tempColumns = array (
9 'tx_openid_openid' => array (
10 'exclude' => 0,
11 'label' => 'LLL:EXT:openid/locallang_db.xml:be_users.tx_openid_openid',
12 'config' => array (
13 'type' => 'input',
14 'size' => '30',
15 // Requirement: unique (BE users are unique in the whole system)
16 'eval' => 'trim,nospace,unique',
17 )
18 ),
19 );
20
21 // Add new columns to be_users table
22 t3lib_div::loadTCA('be_users');
23 t3lib_extMgm::addTCAcolumns('be_users', $tempColumns, false);
24 t3lib_extMgm::addToAllTCAtypes('be_users','tx_openid_openid;;;;1-1-1', '', 'after:username');
25 t3lib_extMgm::addLLrefForTCAdescr('be_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
26
27 // Prepare new columns for fe_users table
28 $tempColumns['tx_openid_openid']['config']['eval'] = 'trim,nospace,uniqueInPid';
29
30 // Add new columns to fe_users table
31 t3lib_div::loadTCA('fe_users');
32 t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, false);
33 t3lib_extMgm::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
34 t3lib_extMgm::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
35
36 // Add field to setup module
37 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_openid_openid'] = array(
38 'type' => 'user',
39 'table' => 'be_users',
40 'label' => 'LLL:EXT:openid/locallang_db.xml:_MOD_user_setup.tx_openid_openid',
41 'csh' => 'tx_openid_openid',
42 'userFunc' => 'EXT:openid/class.tx_openid_mod_setup.php:tx_openid_mod_setup->renderOpenID',
43 'access' => 'tx_openid_mod_setup'
44 );
45 t3lib_extMgm::addFieldsToUserSettings('tx_openid_openid', 'after:password2');
46 t3lib_extMgm::addLLrefForTCAdescr('_MOD_user_setup','EXT:openid/locallang_csh_mod.xml');
47 ?>