Sign up / Sign in Redirect Rule?

Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
8 years ago
831 posts
I know i have asked about this before but one of the things we used on SE before we moved to jamroom was the sign in sign up redirect i had it set so that users would return to the entry page once signed in so for example someone sees a blog shared somewhere on the internet, they click it and want to comment but they have to sign in or sign up first once they do they would be auto redirected back to that comments section so they could continue what they came for. We cant do that here and that is the main reason i am still using disqus comments on my site here. But i would love to be able to just use the sites built in comments module but i fear most would be lost once they signed in and land on the profile page. yes i know they could hit the back button but honestly how many people do we think are actually going to do that why not make it as easy as possible for them? what are your thoughts on this?
updated by @zachary-moonshine: 03/02/18 11:44:28PM
michael
@michael
8 years ago
7,800 posts
its possible, but I haven't done it.

The function:
jrUser_save_location()
will save a cookie to the users browser that tells the system where to go after successful login.

The problem is where to call that function. If you call it in the templates, you run into the issue of caching. Even if you get passed that you need to setup some rules to decide which pages NOT to call it on, like the login page.

So yes its doable with a bit of fiddling and a module, but it doesn't exist as a setting to turn on/off right now.

The other option I can think of would be to put your login form in a lightbox that pops open. They login and on successful login the lightbox closes and the current page refreshes, so they are logging in and being redirected but that window is quickly closed.
Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
8 years ago
831 posts
the lightbox would be awesome how can that be set up?