on EE 2.x the Freemember addon allowed to directly redirect the user after login/logout to a specified page (avoiding the default login/logout confirmation page).

Since the Freemember addon is EOL, how can I achieve the same thing on EE 5.x ?

2 Answers 2


Not sure it's really possibly without editing core files at this point. I don't have time to test this, but I'll throw out a small guess based on hooks.

For login, you'd need to try one of these hooks:


I'm guessing the first two hooks occur after the splash page, so that's out. If not, that could be a key place to take over control with an extension and see where you can go from there.

The last hook is going to happen probably before the splash page and before the user is logged in, so what you'd have to do is (if it's possible) scrap the $_POST data for login info, and then instantiate the auth class, and log in the member yourself (provided you can even still do this in EE 5.X). You can always try this:

$sess = ee()->auth->authenticate_username("my_test_user", "my_test_pass");

somewhere to see if you can even still do that. If you can, you can take control with the member_member_login_start() hook and then redirect, and die() at the end of it.

For logout; I'm too tired to type up any more, but similar ideas. Test the log out hooks, and if you can take control of one before it hits the splash screen (and you have the where withall to properly log the user out with you're own code and the auth and/or session library) you can redirect there most likely.

Caution with this one if you proceed. Make sure members are fully logged in and out if you take control of auth and session.

Also, this may break the basic auth loop (bad password? try again; bad user? try again; too many log in attempts? wait a while; etc...).

  • 1
    thank you, I used member_member_login_single($hook_data) in a custom extension to get this done, but cannot vote this as correct answer as I don't have enough rep
    – pete19
    Feb 15, 2020 at 10:40

A cruder but effective work-around (instead of rolling an add-on) is simply to submit the login form via an AJAX call and do the redirect to where ever via javascript. The login activity will still trigger the splash screen, but it won't be visible / shown to the user.


  • I assumed the question was in reference to Control Panel logins, not front-end logins. But even still, this is an intriguing approach. It would also be complex and have to handle (if even possible) the auth loop (bad password, too many login attempts, etc..).
    – jrothafer
    Feb 17, 2020 at 8:34
  • jrothafer - indeed true - hence the description of any likely solution as "cruder" - it is possible to trap for failed logins of various kinds, but not so elegantly at a code level - but given control over UI AJAX gives you can get a working solution without splash screen without huge complexity. Feb 18, 2020 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.