Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › Redirect to Login Form and back again?
- This topic has 4 replies, 2 voices, and was last updated 13 years, 6 months ago by amin007.
-
AuthorPosts
-
May 11, 2011 at 7:08 am #3376Blue OwlSpectator
Hi.
At the moment when a visitor goes to a page with protected content, there is a message that says “Please Login to view this Content.(Not a member? Join Today!)”
Is it possible to do the following: When the visitor goes to a protected page, they are automatically redirected to another page with a login form, and redirected back to the original protected page after they’ve submitted the login form?
(I’d like to set up the site so the front end works in a similar way as the WordPress back end does – you get a simple page with a login form if you try to go to one of the admin panels without being logged in first.)
This is how the visitor would experience this ‘workflow’ –
1. Visitor clicks on link to protected page
2. Visitor is not logged in (or doesn’t have the right membership level) so the site takes him to a Login page instead
3. Visitor types in username and password, and submits the form
4. Visitor is automatically redirected back to original page he was trying to access
May 11, 2011 at 11:33 pm #32334amin007ParticipantThats how it currently works given you did not specify an after login page to redirect to in the membership level or pages settings page. If you have specified an after login page redirection then obviously the plugin will direct to that designated page since you specified it.
May 12, 2011 at 7:06 am #32335Blue OwlSpectatorSure. I get that.
I would like to skip the message that says “Please Login to view this Content…” and rather than that, go directly to a page with the login form on it.
So, eMember would redirect the visitor straight to the login form when they click on a link to a protected page, rather than arriving at the protected page first and then needing to click a link to go to the page with the login form on it.
Right now it’s this process:
Click a link to protected page > Arrive at protected page > Get ‘Please Login’ message > Click login link > Fill out and submit login form > Return to protected page
I would like to remove a couple of steps so it goes like this:
Click a link to protected page > Arrive at login form > Fill out and submit login form > Proceed onto protected page
Does that make sense?
May 12, 2011 at 7:07 am #32336Blue OwlSpectatorSure. I get that.
I would like to skip the message that says “Please Login to view this Content…” and rather than that, go directly to a page with the login form on it.
So, eMember would redirect the visitor straight to the login form when they click on a link to a protected page, rather than arriving at the protected page first and then needing to click a link to go to the page with the login form on it.
Right now it’s this process:
Click a link to protected page > Arrive at protected page > Get ‘Please Login’ message > Click login link > Fill out and submit login form > Return to protected page
I would like to remove a couple of steps so it goes like this:
Click a link to protected page > Arrive at login form > Fill out and submit login form > Proceed onto protected page
Does that make sense?
May 13, 2011 at 12:19 am #32337amin007ParticipantSimply create your link to the protected page like the follwoing:
http://www.example.com/my-protected-page-url?event=login
If you add the “?event=login” to the end of a protected page’s URL it will prompt the user with the login from when they click on that link then send them to the page after login.
The option is to enable the “Fancy Login” option. This allows the user to click on the login link and log-in right there (they don’t get redirected to a login page). The demo site has example of this. Go to the following link and click on the “Login” link and you will see what it does:
-
AuthorPosts
- You must be logged in to reply to this topic.