[BUGFIX] Disable of password field in setup should disable password2 too
authorSteffen Kamper <info@sk-typo3.de>
Tue, 29 Mar 2011 10:52:27 +0000 (12:52 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Wed, 6 Apr 2011 20:11:46 +0000 (22:11 +0200)
When using this userTS for disable the password field:
setup.fields.password.disabled=1
Then the field password2 for repeat the password remains rendered.

Solution:
if password is disabled, disable password2 too.

Change-Id: I954343d287302a2b65f4d3a6abdf34e528377cbc
Resolves: #25423
Reviewed-on: http://review.typo3.org/1303
Reviewed-by: Björn Pedersen
Reviewed-by: BIDAU
Tested-by: BIDAU
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/setup/mod/index.php

index cd4454d..4f4e59e 100755 (executable)
@@ -314,7 +314,10 @@ class SC_mod_user_setup_index {
                $this->overrideConf = $GLOBALS['BE_USER']->getTSConfigProp('setup.override');
                        // Getting the disabled fields might be set in User TSconfig (eg setup.fields.password.disabled=1)
                $this->tsFieldConf = $GLOBALS['BE_USER']->getTSConfigProp('setup.fields');
-
+                       // id password is disabled, disable repeat of password too (password2)
+               if (isset($this->tsFieldConf['password.']) && ($this->tsFieldConf['password.']['disabled'])) {
+                       $this->tsFieldConf['password2.']['disabled'] = 1;
+               }
                        // Create instance of object for output of data
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -1032,4 +1035,4 @@ $SOBE->main();
 $SOBE->printContent();
 
 $SOBE->getFormProtection()->persistTokens();
-?>
+?>
\ No newline at end of file