[BUGFIX] Properly load existing usergroups in task
authorBart Dubelaar <bartdubelaar@gmail.com>
Mon, 23 Apr 2012 09:13:30 +0000 (11:13 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 21 Jun 2012 19:01:51 +0000 (21:01 +0200)
The create backend user task did not properly load
the usergroups of an existing user, because it wrongly
assumes that the groups are provided as array.
Actually the groups are provided as raw DB field,
thus no conversion is needed.

Change-Id: Ia704e071f6565f1a892e5f5c8d4c2b83a106f32f
Fixes: #36300
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/12263
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/sys_action/task/class.tx_sysaction_task.php

index 3c3e2f6..e1fba1f 100644 (file)
@@ -722,7 +722,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                foreach($grList as $group) {
                        $checkGroup = t3lib_BEfunc::getRecord('be_groups', $group);
                        if (is_array($checkGroup)) {
-                               $selected = (is_array($vars['usergroup']) && t3lib_div::inList(implode(',', $vars['usergroup']), $checkGroup['uid'])) ? ' selected="selected" ' : '';
+                               $selected = t3lib_div::inList($vars['usergroup'], $checkGroup['uid']) ? ' selected="selected" ' : '';
                                $content .= '<option ' . $selected . 'value="' . $checkGroup['uid'] . '">' . htmlspecialchars($checkGroup['title']) . '</option>';
                        }
                }
@@ -1032,4 +1032,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/sys_action/task/class.tx_sysaction_task.php']);
 }
 
-?>
\ No newline at end of file
+?>