Redirecting the user to a file after login

If I send a protected file to a registered user who is not currently logged in, after logging in to the system, can the system redirect the user to the protected file?
I am sending a link to a protected pdf file and after logging in I would like that PDF to show up to the user.

Is that doable?

Thank you!
Dan

that’s an easy test dan… just setup a test member with full access, get the link you wish to use for the file download, log out completely of S2 and paste the url in the url bar and see what happens. Then you’ll know for sure. :slight_smile:

Marie, the default behavior will be that he gets sent to the Membership Options Page.

Dan, that redirection to the Membership Options Page includes some variables that you can use for your custom redirection back to the product, though. WP Admin > s2Member > API / Scripting > Membership Options Page Variables

See this article: https://s2member.com/kb-article/automatically-redirecting-to-a-protected-page-after-login/

I hope that helps. :slight_smile:

Thanks Cristián, I will check it out.

Dan

1 Like