I have a number of pages that are only viewable to users who are NOT logged in. I have a widget that allows users to sign in.
I am trying to find a way for users who sign in whilst on these particular pages to be redirected to my homepage. Any users who sign in on any other pages will remain on that page.
I assume the code will need to be the following:
Has user logged in
is current page A or B or C
if yes, redirect to homepage
else
redirect to current page