|
TYPO3 API
SVNRelease
|
00001 <?php 00002 // Make sure that we are executed only from the inside of TYPO3 00003 if (!defined ('TYPO3_MODE')) { 00004 die ('Access denied.'); 00005 } 00006 00007 // Prepare new columns for be_users table 00008 $tempColumns = array ( 00009 'tx_openid_openid' => array ( 00010 'exclude' => 0, 00011 'label' => 'LLL:EXT:openid/locallang_db.xml:be_users.tx_openid_openid', 00012 'config' => array ( 00013 'type' => 'input', 00014 'size' => '30', 00015 // Requirement: unique (BE users are unique in the whole system) 00016 'eval' => 'trim,nospace,unique', 00017 ) 00018 ), 00019 ); 00020 00021 // Add new columns to be_users table 00022 t3lib_div::loadTCA('be_users'); 00023 t3lib_extMgm::addTCAcolumns('be_users', $tempColumns, false); 00024 t3lib_extMgm::addToAllTCAtypes('be_users','tx_openid_openid;;;;1-1-1', '', 'after:username'); 00025 t3lib_extMgm::addLLrefForTCAdescr('be_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml'); 00026 00027 // Prepare new columns for fe_users table 00028 $tempColumns['tx_openid_openid']['config']['eval'] = 'trim,nospace,uniqueInPid'; 00029 00030 // Add new columns to fe_users table 00031 t3lib_div::loadTCA('fe_users'); 00032 t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, false); 00033 t3lib_extMgm::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid'); 00034 t3lib_extMgm::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml'); 00035 00036 // Add field to setup module 00037 $GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_openid_openid'] = array( 00038 'type' => 'user', 00039 'table' => 'be_users', 00040 'label' => 'LLL:EXT:openid/locallang_db.xml:_MOD_user_setup.tx_openid_openid', 00041 'csh' => 'tx_openid_openid', 00042 'userFunc' => 'EXT:openid/class.tx_openid_mod_setup.php:tx_openid_mod_setup->renderOpenID', 00043 'access' => 'tx_openid_mod_setup' 00044 ); 00045 t3lib_extMgm::addFieldsToUserSettings('tx_openid_openid', 'after:password2'); 00046 t3lib_extMgm::addLLrefForTCAdescr('_MOD_user_setup','EXT:openid/locallang_csh_mod.xml'); 00047 ?>
1.8.0