Index: core/units/helpers/user_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/user_helper.php (revision 15775) +++ core/units/helpers/user_helper.php (revision ) @@ -480,14 +480,36 @@ unset($vars['login'], $vars['logout']); // merge back url params, because they were ignored if this was "external:" url - $vars['pass'] = implode(',', $vars['pass']); - $vars = array_merge($vars, $this->event->getRedirectParams()); + $vars = array_merge($vars, $this->getRedirectParams($vars['pass'], 'pass')); $template = $vars['t']; unset($vars['is_virtual'], $vars['t']); $this->event->redirect = $template; $this->event->setRedirectParams($vars, false); + } + + /** + * Returns current event redirect params with given $prefixes injected into 'pass'. + * + * @param array $prefixes List of prefixes to inject. + * @param string $pass_name Name of array key in redirect params, containing comma-separated prefixes list. + * + * @return string + * @access protected + */ + protected function getRedirectParams($prefixes, $pass_name = 'passed') + { + $redirect_params = $this->event->getRedirectParams(); + + if ( isset($redirect_params[$pass_name]) ) { + $redirect_prefixes = explode(',', $redirect_params[$pass_name]); + $prefixes = array_unique(array_merge($prefixes, $redirect_prefixes)); + } + + $redirect_params[$pass_name] = implode(',', $prefixes); + + return $redirect_params; } /**