Index: typo3/sysext/setup/mod/index.php
===================================================================
--- typo3/sysext/setup/mod/index.php (revision 5906)
+++ typo3/sysext/setup/mod/index.php (working copy)
@@ -133,7 +133,7 @@
// First check if something is submittet in the data-array from POST vars
$d = t3lib_div::_POST('data');
$columns = $GLOBALS['TYPO3_USER_SETTINGS']['columns'];
-
+ $storeRec = array();
if (is_array($d)) {
// UC hashed before applying changes
@@ -159,6 +159,10 @@
// save all submitted values if they are no array (arrays are with table=be_users) and exists in $GLOBALS['TYPO3_USER_SETTINGS'][columns]
foreach($columns as $field => $config) {
if ($config['table']) {
+ if ($config['table'] == 'be_users' && !in_array($field, array('password', 'password2', 'email', 'realName'))) {
+ $storeRec['be_users'][$BE_USER->user['uid']][$field] = $d['be_users'][$field];
+ $BE_USER->user[$field] = $d['be_users'][$field];
+ }
continue;
}
if ($config['type'] == 'check') {
@@ -186,14 +190,15 @@
|| (strlen($be_user_data['password'])==32
&& !strcmp($be_user_data['password'],$be_user_data['password2']))
) {
- $storeRec = array();
$BE_USER->user['realName'] = $storeRec['be_users'][$BE_USER->user['uid']]['realName'] = substr($be_user_data['realName'],0,80);
$BE_USER->user['email'] = $storeRec['be_users'][$BE_USER->user['uid']]['email'] = substr($be_user_data['email'],0,80);
if (strlen($be_user_data['password'])==32 && !strcmp($be_user_data['password'],$be_user_data['password2'])) {
$BE_USER->user['password'] = $storeRec['be_users'][$BE_USER->user['uid']]['password'] = $be_user_data['password2'];
$this->PASSWORD_UPDATED = 1;
}
+ }
+ if (count($storeRec)) {
// Make instance of TCE for storing the changes.
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values=0;
@@ -485,16 +490,19 @@
$more .= ' style="' . $style . '"';
}
+ $value = $config['table'] == 'be_users' ? $GLOBALS['BE_USER']->user[$fieldName] : $GLOBALS['BE_USER']->uc[$fieldName];
+ if (!$value && isset($config['default'])) {
+ $value = $config['default'];
+ }
+
switch ($type) {
case 'text':
case 'password':
$dataAdd = '';
if ($config['table'] == 'be_users') {
$dataAdd = '[be_users]';
- $value = $GLOBALS['BE_USER']->user[$fieldName];
- } else {
- $value = $GLOBALS['BE_USER']->uc[$fieldName];
}
+
if ($eval == 'md5') {
$more .= ' onchange="this.value=this.value?MD5(this.value):\'\';"';
}
@@ -509,13 +517,14 @@
value="' . htmlspecialchars($value) . '" ' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . $more . ' />';
break;
case 'check':
- if (!$class) {
+ if (!$class) {
$more .= ' class="check"';
}
+
$html = 'uc[$fieldName] ? ' checked="checked"' : '') . $more . ' />';
+ ($value ? ' checked="checked"' : '') . $more . ' />';
break;
case 'select':
if (!$class) {
@@ -528,7 +537,7 @@
$html = '';