[BUGFIX] EXT:sys_action: prepend prefix only once on BE-User edit 12/41712/5
authorDaniel Goerz <ervaude@gmail.com>
Sun, 19 Jul 2015 20:21:28 +0000 (22:21 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 20 Jul 2015 20:09:09 +0000 (22:09 +0200)
Change-Id: I4e00d5a2198f6f3f98f8a08161188d5982962290
Resolves: #27440
Resolves: #31110
Related: #68370
Releases: master
Reviewed-on: http://review.typo3.org/41712
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/sys_action/Classes/ActionTask.php

index cf04c43..fe2c6eb 100644 (file)
@@ -490,7 +490,11 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         * @return string Combined username
         */
        protected function fixUsername($username, $prefix) {
-               return trim($prefix) . trim($username);
+               $prefix = trim($prefix);
+               if (substr($username, 0, strlen($prefix)) === $prefix) {
+                       $username = substr($username, strlen($prefix));
+               }
+               return $prefix . $username;
        }
 
        /**