12-19-2016, 02:17 PM
Well, you're the first person that has ever asked that. I've been thinking about your problem and I think the best way to handle it is with a $_GET variable. What I would do is something like this...
On each of the referring pages that are pointing you to the login page, I would make your link something like
...the rest of the link /users/login.php?code=1234
(or if you know where the site is you could do https://mydomain.com/users/login.php?code=1234)
And then if you want them to go somewhere else, you could do
/users/login.php?code=5678
Then, I would go to usersc/scripts/custom_login_script.php and I would do something like this...
http://pastebin.com/vgnewtna
Now obviously that's just a framework of how to do the redirects. There's a lot you could do from there. You could have that link auto-generated by querying the database...you could use the securePage function to do the check for you. My main thought is that people don't usually change whether or not a page is private very often, so you should just be able to put the link there statically.
On each of the referring pages that are pointing you to the login page, I would make your link something like
...the rest of the link /users/login.php?code=1234
(or if you know where the site is you could do https://mydomain.com/users/login.php?code=1234)
And then if you want them to go somewhere else, you could do
/users/login.php?code=5678
Then, I would go to usersc/scripts/custom_login_script.php and I would do something like this...
http://pastebin.com/vgnewtna
Now obviously that's just a framework of how to do the redirects. There's a lot you could do from there. You could have that link auto-generated by querying the database...you could use the securePage function to do the check for you. My main thought is that people don't usually change whether or not a page is private very often, so you should just be able to put the link there statically.