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.

Multiple Login Welcome Pages and cc

Home Forums Community Forum Multiple Login Welcome Pages and cc

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 6 months ago.

Topic Author Topic
Posted: Wednesday Jun 20th, 2012 at 6:55 am #16989

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Jun 21st, 2012 at 7:04 am #17089

Hi Malin.

If you use the same code for your Login Welcome page to redirect people based on the ccap, then the last condition that is true will define the redirection URL to, and will be the one used in the end.

So if a user with ccap1, ccap2 and ccap3 lands on that page and you had:

[hilite pre_code]
if (current_user_can('access_s2member_ccap_ccap1'))
$welcome_page = "http://mywebsite.se/welcome-ccap1/";
if (current_user_can('access_s2member_ccap_ccap2'))
$welcome_page = "http://mywebsite.se/welcome-ccap2/";
if (current_user_can('access_s2member_ccap_ccap3'))
$welcome_page = "http://mywebsite.se/welcome-ccap3/";
[/hilite]

then $welcome_page would be the one for ccap3.

If you used elseif’s instead, then the first one to be true would be it:

[hilite pre_code]
if (current_user_can('access_s2member_ccap_ccap1'))
$welcome_page = "http://mywebsite.se/welcome-ccap1/";
elseif (current_user_can('access_s2member_ccap_ccap2'))
$welcome_page = "http://mywebsite.se/welcome-ccap2/";
elseif (current_user_can('access_s2member_ccap_ccap3'))
$welcome_page = "http://mywebsite.se/welcome-ccap3/";
[/hilite]

In this case the URL for ccap1.

I hope that helps. :)

Viewing 1 replies (of 1 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.