[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 18:47:39 +0000 (20:47 +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/10706
Reviewed-by: Philipp Gampe
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Dmitry Dulepov
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/sys_action/task/class.tx_sysaction_task.php

index 13a4f7d..b52ea57 100644 (file)
@@ -747,7 +747,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>';
                        }
                }