When we call login_box() function with $redirect parameter then are rendered two hidden fields - both named "redirect". First field come from $redirect parameter, second fields comes from
{S_LOGIN_REDIRECT}and is hardcoded in page_header() function. First field value is overwriten by second field and redirection not work valid.
Here is my solution for it:
2942,2946d2941
|
< if ($redirect)
|
< {
|
< $s_hidden_fields['redirect'] = $redirect;
|
< }
|
<
|
2964a2960
|
> 'S_LOGIN_REDIRECT' => $redirect ? build_hidden_fields(array('redirect' => $redirect)) : null,
|
4241c4237
|
< 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&', '&', build_url()))),
|
---
|
> 'S_LOGIN_REDIRECT' => isset($template->_rootref['S_LOGIN_REDIRECT']) && $template->_rootref['S_LOGIN_REDIRECT'] ? $template->_rootref['S_LOGIN_REDIRECT'] : build_hidden_fields(array('redirect' => str_replace('&', '&', build_url()))),
|
- is duplicated by
-
PHPBB-9600 Wrong redirection after login
- Closed