[php] core.login_box_redirect

Request hook events and what data needs to be sent for the new hook system.
Post Reply
User avatar
John P
Posts: 157
Joined: Sun Nov 04, 2012 7:39 am
Location: Netherlands
Contact:

[php] core.login_box_redirect

Post by John P »

Could not find where this event is requested but want to move the event a little up so it can be used for more then only redirect.

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)));

cprgolds
Registered User
Posts: 1
Joined: Sun Jul 13, 2014 5:38 am

Re: [php] core.login_box_redirect

Post by cprgolds »

Please add me to the list of those who would like to see John's suggested change.

Thanks

Post Reply