Page 1 of 1

login welcome with user name

PostPosted: November 24th, 2011, 1:15 pm
by defeyter
Hello Everyone,

I need to have login welcome pages based on the user name, using S2-member pro.
%%current_user_display_name%% is not working...

Which custom code should I use?

Thank you for the help,

Chris de Feijter

Re: login welcome with user name

PostPosted: November 24th, 2011, 1:21 pm
by Eduan
That's because %%current_user_display_name%% is for emails only.
You gotta use the shortcodes under WP Admin -> s2Member -> API / Scripting -> s2Member PHP/API Constants.

Here's the corresponding one:
[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]

Hope this helps. :)

Re: login welcome with user name

PostPosted: November 24th, 2011, 1:26 pm
by defeyter
Thank you for the reply.

Do I enter it like %%[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]%%

or like %%S2MEMBER_CURRENT_USER_DISPLAY_NAME%% (Tried this one, but it does not work).

Thanks,
Chris

Re: login welcome with user name

PostPosted: November 24th, 2011, 1:30 pm
by Eduan
Just enter it like this:
[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]

It will display the display name.

Re: login welcome with user name

PostPosted: November 24th, 2011, 2:52 pm
by defeyter
Hi,

It gives me a 404. So I entered as replacement code:
[s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /] as the Login welcome under settings-general-login welcome page.

Then I created the new page with title and slug of the username. If the username is example, I named that page example.

What am I doing horribly wrong?

Thanks for the help

Chris

Re: login welcome with user name

PostPosted: November 24th, 2011, 3:09 pm
by Eduan
Are you putting it like this:
Hello [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]! Or something along those lines?
If you put it as a page title it should work.

Re: login welcome with user name

PostPosted: November 24th, 2011, 3:15 pm
by defeyter
No, I am trying to do something else. I am not sure if we are talking about something else either lol.

I am working under general options - login welcome page - special redirection URL

using a replacement code so that every user has their own customised login welcome page...

I am attaching a screenshot...

So if my user name is Example, when I login, I want to see the welcome page for user Example..

Does that make sense?

Chris

Re: login welcome with user name

PostPosted: November 24th, 2011, 3:37 pm
by Eduan
If that's the case you may want to check this video:
http://www.s2member.com/client-portals-video/

Re: login welcome with user name

PostPosted: November 24th, 2011, 10:39 pm
by defeyter
Thanks, that fixed my problem using the %%current_user_login%% replacement code, combined with the custom capacity.

Great support!

Re: login welcome with user name

PostPosted: November 24th, 2011, 11:19 pm
by Eduan
OK, glad to be able to help!