I need my users to go back to the referring page when they login. Can someone tell me what code I need to put into the auto activate/auto login plugin to make this happen?
Thanks!
Faster, better and easier!
I need my users to go back to the referring page when they login. Can someone tell me what code I need to put into the auto activate/auto login plugin to make this happen?
Thanks!
I should clarify... I need new users to be redirected to the page they were viewing when they clicked on the "sign up" button = "referring page". This is the default behavior for existing users who login on my site-- they go directly back to the page they were viewing before they logged in. I would like to extend this to new users as well.
I've tried changing the bp_core_redirect line in the auto activate augo login plugin to all of the following & in all cases it ends up sending to the home page after signup/login rather than to the referring page...
bp_core_redirect( $_SERVER['REQUEST_URI'] );
bp_core_redirect( $_SERVER['HTTP_REFERER'] );
bp_core_redirect(get_option('siteurl')."/register?redirect_to=".$_SERVER['REQUEST_URI']);
bp_core_redirect(get_option('siteurl')."/register?redirect_to=".$_SERVER['HTTP_REFERER']);
I am really stuck, so any suggestions are appreciated!
You must log in to post.