XF 1.4 Login redirect problem

MarkMark

Member
I have a link on my main page (in the base Dir) that says "Login to our forums" (Everything in the forums is locked down, and only registered members can view anything)

This directs the user to /forums/index.php?login and presents them with a nice clean login box.

However, I have the problem that when you log in using the form, you are redirected back to our home page, rather than the forums. Clicking the link again just results in a loop, constantly pushing you back to the home page rather than the forum index.

The only way around this is to have the "login to our forums" link point to "/forums/index.php" instead, as this does not cause the same behaviour, and instead sends the newly logged in user to the forums.

However, the problem with this approach is that the user is presented with a "You must be logged-in to do that" message as well as the login form, which is a bit silly when you are in fact trying to log in.

Is there a way to resolve this?
 
The login form will take you back to the page you were on, if it can. You can deactivate this by passing an explicit redirect target in though:

Code:
/forums/index.php?login/&redirect=http://site.com/target
 
Top Bottom