If we place the event above if ($result['status'] == LOGIN_SUCCESS) in includes/functions.php and add variable result to it's vars we can do a lot more with it. The redirect functionality stays in this way. Maybe adjust the name of the event a little.
I want to use it for logging wrong logins for example.
Code: Select all
/**
* 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('result', 'redirect', 'admin', 'return');
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));