latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Conditional Redirecting of a user

Home Forums Community Forum Conditional Redirecting of a user

This topic contains 5 replies, has 4 voices. Last updated by  Raam Dev 4 years, 3 months ago.

Topic Author Topic
Posted: Friday Sep 21st, 2012 at 10:00 am #26052

Hi,
I would like to be able to check the status of a user when he logs in, and redirect him to a page depending on his status.
I went through the topics already posted on the forum, and the one which seems close to what I want is this one:
a redirect depending on the ccap.
http://www.s2member.com/forums/topic/redirecting-to-different-pages-ccaps-levels/

The person who offered a solution has provided a link for the code he used to redirect users depending on their ccaps.
Unfortunately, THAT LINK IS DEAD.
Could you help me please to find a solution to that issue?

Thank you.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Sep 22nd, 2012 at 5:47 am #26095

Hi Simeon.

It’s not very hard. Right after login, the person will be taken to the Login Welcome page. [hilite path]Dashboard -› s2Member® -› General Options -› Login Welcome Page[/hilite].

In that page, you can have conditionals that checks the status of the user, and based on that can be redirected with JavaScript.
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals[/hilite]
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals[/hilite]

A bit faster redirection could be done with a hack in the must-use plugins directory, probably using the wp-loaded hook.

I hope that helps. :)

Posted: Sunday Sep 23rd, 2012 at 2:23 pm #26201

Thank you Cristian.
Will learn ho to do that.

Posted: Monday Sep 24th, 2012 at 6:49 am #26278

Cool. :)

Posted: Wednesday Sep 26th, 2012 at 9:34 pm #26638

Hi Cristian,

Thank you for the information above. I am looking to do this as well, where upon login the user is directed to one of four pages based on their member level.

I’m curious as to how you would add the redirect into the Login Welcome Page settings. Does that one line input accept php or java? Or would you suggest redirecting to a processing page which contains the conditional redirect logic.

Many thanks,
Scott

Posted: Thursday Sep 27th, 2012 at 7:05 pm #26758
Raam Dev
Username: Raam
Staff Member

Hi Simeon, Scott,

Please see this thread for more information on creating a Login Welcome Page redirect for multiple membership levels.

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.