mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge branch 'ticket/12985' into develop-ascraeus
This commit is contained in:
commit
994a0dcd4c
1 changed files with 13 additions and 1 deletions
|
@ -2768,7 +2768,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
||||||
global $request, $phpbb_container;
|
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
$err = '';
|
$err = '';
|
||||||
|
|
||||||
|
@ -2854,6 +2854,18 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
{
|
{
|
||||||
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
|
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event allows an extension to modify the redirection when a user successfully logs in
|
||||||
|
*
|
||||||
|
* @event core.login_box_redirect
|
||||||
|
* @var string redirect Redirect string
|
||||||
|
* @var boolean admin Is admin?
|
||||||
|
* @var bool return If true, do not redirect but return the sanitized URL.
|
||||||
|
* @since 3.1.0-RC5
|
||||||
|
*/
|
||||||
|
$vars = array('redirect', 'admin', 'return');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
|
||||||
|
|
||||||
// append/replace SID (may change during the session for AOL users)
|
// append/replace SID (may change during the session for AOL users)
|
||||||
$redirect = reapply_sid($redirect);
|
$redirect = reapply_sid($redirect);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue