#9474: Integrate OpenID authentication support to TYPO3
[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 = array (
29 'tx_openid_openid' => array (
30 'exclude' => 0,
31 'label' => 'LLL:EXT:openid/locallang_db.xml:fe_users.tx_openid_openid',
32 'config' => array (
33 'type' => 'input',
34 'size' => '30',
35 // Requirement: uniqueInPid (FE users are pid-specific)
36 'eval' => 'trim,nospace,uniqueInPid',
37 )
38 ),
39 );
40
41 // Add new columns to fe_users table
42 t3lib_div::loadTCA('fe_users');
43 t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, false);
44 t3lib_extMgm::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
45 t3lib_extMgm::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
46
47 ?>