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.

"you must be logged in" notice upon redirect

Home Forums Community Forum Unofficial Extensions/Hacks "you must be logged in" notice upon redirect

This topic contains 4 replies, has 2 voices. Last updated by  Eduan 4 years, 2 months ago.

Topic Author Topic
Posted: Thursday Oct 18th, 2012 at 7:48 am #28816

Hello, I would like to have a custom “you must be logged in” notice show up on the membership options page. On my site, there is a call to action to join site, that button taking you to the membership options page (where they can then link to signup). Cool, that’s fine. If a person tries to access a protected page, they get redirected to this membership options page. Cool again.

BUT, is there a way if the 2nd scenario occurs, a notice can show saying “you must be logged in to access this page, please see the options below to join” etc..?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Oct 18th, 2012 at 7:52 am #28818

or for example, a way to detect if the cookie for logged in users is set?

Posted: Thursday Oct 18th, 2012 at 12:49 pm #28858
Eduan
Username: Eduan
Moderator

Hello Michael,

I’m not really sure what you are trying to achieve, could you please be a little more clear on what you need or want? Thanks. :)

– Eduan

Posted: Thursday Oct 18th, 2012 at 1:57 pm #28878

Ok, ill elaborate.

I’ve got a site, http://www.mysite.com, its got a section, http://www.mysite.com/special that requires a login to access content (via s2member). Joe blow user comes along and finds his way to the /special area. S2member will just redirect to user to http://www.mysite.com/membership-options-page.

On that membership options page, I would like a way to add a notice (via div or something) that says “you must be logged in to access that page”, since joe blow tried to access a page that he must be logged in to access. Had he just gone straight to /membership-options-page via, say, a button on my site that reads “click here to sign up”, the div notice wouldnt show up, because he didn’t first try to access protected content.

mikey

Posted: Thursday Oct 18th, 2012 at 2:19 pm #28883
Eduan
Username: Eduan
Moderator

Hello Mikey,

I think you would have to use MOP vars (Membership Options Page variables) in order to achieve this.

Check under Dashboard -› s2Member® -› API / Scripting -› Membership Options Page Variables (MOP Vars) for documentation on them.

Hope this helps. :)

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