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.

level 0 members getting into paid areas

Home Forums Community Forum level 0 members getting into paid areas

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

Topic Author Topic
Posted: Thursday Sep 6th, 2012 at 2:33 pm #24366
lisa carr
Username: pageadmin

hi,

i configured my membership login welcome page (the one that says it automatically is protected from public access) and when i am in the pages view in wordpress, on the s2 column, it shows the lock symbol – but when i hover over it, it says “requires membership level 0”.
i tested a free subscriber user and i can get into all the members only pages –

i’ve added page access restrictions to level 1 and higher (which doesn’t effect it)
i’ve added category access restrictions to level 1 and higher and still can get in….

i need some help! this is a live site and my client wants to protect the info….
can anybody suggest anything?

  • This topic was modified 4 years, 4 months ago by  lisa carr.
  • This topic was modified 4 years, 4 months ago by  lisa carr.

List Of Topic Replies

Viewing 20 replies - 1 through 20 (of 20 total)
Author Replies
Author Replies
Posted: Friday Sep 7th, 2012 at 5:19 am #24485

Hi Lisa.

Did you also set the Membership Options page? Restrictions won’t work until that’s set too. [hilite path]Dashboard -› s2Member® -› General Options -› Membership Options Page[/hilite]

Posted: Friday Sep 7th, 2012 at 8:50 am #24510
lisa carr
Username: pageadmin

Hi Cristian,

Yes i did. Here it is: http://www.giftedpage.org/membership-options/

i did import 700+ users into S2 – and used the “subscriber” role for the members who had an expired membership….

here’s a screenshot of what happens when i hover over the lock icon for the protected page

it says requires membership level #0 ….
if i open that page up in WP – i see a box that says: This Page is your:
Login Welcome Page
( automatically guarded by s2Member )
——————–
Obviously – it’s not being guarded!

Any info you could provide would be much appreciated – as i said before, this site is live and people are able to see what the paid memberships are seeing.

Posted: Saturday Sep 8th, 2012 at 6:18 am #24607

Are you positive you’re not logged in when you try to open the pages protected at Level 0?

Could you send a link to your site using the contact form, if you don’t want to make it public? I’d like to try it myself. s2Member® » Private Contact Form

Thanks!

Posted: Saturday Sep 8th, 2012 at 5:02 pm #24666
lisa carr
Username: pageadmin

Hi Cristian,

I just sent you an email via the private contact form. I made sure that i was logged out and then logged in as a user that i input into the S2 – a free subscriber and was directly taken to the member area.

So any help you could provide would be awesome!
thanks!

Posted: Monday Sep 10th, 2012 at 7:34 am #24733

Thanks! I got your email.

I tried loading some of the protected pages and I was properly sent to the Membership Options Page each time. The pages I tried where the ones with IDs 649, 1016 and 547.

Which one was the one you had trouble with? Give me the ID so I try it too, please.

Posted: Monday Sep 10th, 2012 at 8:59 am #24745
lisa carr
Username: pageadmin

Hi Cristian,

the main page is the 547 – the one that shows in the screenshot above.

The issue is that i imported many people into the database who had expired memberships (but we wanted to keep their info so they could renew). If you look in the users, you’ll see 149 users who are free subscribers. These people are trying to login and using the “lost password” option and then changing their password – then when they login, they are getting into the main protected page which is 547 when they should be re-directed to the membership options page.

You have the admin login info – from the private contact form i used, could you try adding yourself as a free subscriber and then go to the member login, click the lost password and try getting in again?

Thanks for your help!

Posted: Monday Sep 10th, 2012 at 6:35 pm #24782
lisa carr
Username: pageadmin

Hi Cristian,

I tried dumping all of my history, cache, cookies….as a last resort – and then logging in as a free subscriber and it still goes directly to the member protected page.

Posted: Monday Sep 10th, 2012 at 7:11 pm #24783

Hello Lisa,

Page ID 547 is your login welcome page.

So when anybody logins in thats the page they are taken too, this is both normal and expected behaviour.

That page is protected from the public and non-members.

Subscribers are still members, level 0 members albeit not paying ones.

What is it that your trying to achieve? What would you like to happen to those members? There are a couple of options here the first is you can create a separate login welcome page for subscribers/level-0 that they are redirected to upon login or you can use conditional shortcodes to display and hide whatever messages/content you have in your welcome page.

Let me know if you need me to explain how to do those :)

Posted: Monday Sep 10th, 2012 at 7:50 pm #24790
lisa carr
Username: pageadmin

Hi Philly,

OK – i understand that. Thanks!

I think that i just thought that if your membership was 0 then you would be automatically directed to the membership options page – which had the paypal forms to renew membership. I thought that if you were a member level 1 + then you could go to the login welcome page which is where i put all the paid-member-only content on thinking that it was protected.

so i guess i am wondering how to direct only the free subscribers (already existing members who have let their membership expire….and are already in the database) to go to the sign up page

And then have the paid members level 1 + go to the paid members content page (which i guess i’ll have to not make as the login welcome page)

any thoughts of how to simplify? …..and thanks again for explaining that.

Posted: Monday Sep 10th, 2012 at 8:29 pm #24799
Eduan
Username: Eduan
Moderator

Hello Lisa,

Well I believe you should be able to use something along these lines, you need the PHP Execution plugin installed for this:

<?php if(current_user_is(s2member_level0)) { ?>
	<script type="text/javascript">
		window.location = "http://www.giftedpage.org/membership-options/";
	</script>
<?php } ?>

Haven’t actually tried this yet, but it should work. This would redirect level 0 users to the membership options page, and members >= level 1 would still view the content like normal.

Or you could separate the content like Philly suggested.

Hope this helps. :)

  • This reply was modified 4 years, 3 months ago by  Eduan. Reason: Modified code
Posted: Monday Sep 10th, 2012 at 8:31 pm #24800

I think i would use shortcodes and do this

[s2If current_user_is(s2member_level0)]
    here you could add the pay again stuff and maybe a message saying their account has expired
    
    everything here will only be seen by level 0
[/s2If]


[s2If current_user_can(access_s2member_level1)]
then here is all the stuff for paying members which cannot be seen by level 0
[/s2If]

the other options are to create a meta redirect but that has a 1 second delay so is not smooth, or to have different pages for the different levels

hope that helps

  • This reply was modified 4 years, 3 months ago by  Eduan. Reason: Corrected first conditional
Posted: Tuesday Sep 11th, 2012 at 7:38 am #24874

Eduán, that code won’t work: the condition is wrong, you’re using the function to check the role, but using the capability name, and unquoted. And [hilite mono]header()[/hilite] can’t be used in the body, it’s too late because there was output already, use a JS redirection instead.

Philly, your first conditional also checks the role with the capability name.

I hope that helps. :)

Posted: Tuesday Sep 11th, 2012 at 7:48 am #24875

Yes thats not what I said its been modified it should check that the user is level 0 only because you dont want to display that content to anyone else

[s2If current_user_is(s2member_level0)]
    Some content for Free Subscribers.
[/s2If]
Posted: Tuesday Sep 11th, 2012 at 8:58 am #24887
Eduan
Username: Eduan
Moderator

Hello Cristián, thanks for pointing that out, I changed it to use a JavaScript redirect, and also fixed the conditional.

I also fixed your conditional the first time Philly, thought it was wrong, but I studied a little bit and I was wrong. I put it back, sorry.

– Eduan

Posted: Tuesday Sep 11th, 2012 at 9:32 am #24895
lisa carr
Username: pageadmin

Hi Eduan – Philly and Cristian,

thanks for your input! i do have questions though…. if i were to use the php code that Eduan suggested, where am i adding it?

i have different areas where people can login. On the home page i have a login button – do i add that somehow to the button link? or am i adding it to the main wordpress wp-login.php page?

i am hoping this will work!

Posted: Tuesday Sep 11th, 2012 at 9:58 am #24898
Eduan
Username: Eduan
Moderator

Hello Lisa,

That would be your login welcome page, it would allow you to redirect level 0 users back to the membership options page like you wanted. :)

Posted: Tuesday Sep 11th, 2012 at 10:27 am #24906
lisa carr
Username: pageadmin

HI Eduan,

i added it and it looks like it works! There is a brief “flash” or glimpse of the members area page and then it re-loads the membership options page.

I thank you very much for your help!

On a separate note….while i have you…..a person registered through paypal yesterday (paypal sent an email with confirmation – the email subject was: Item #1::1 Y – Notification of Payment Received from N/A (the person’s email address was here)) BUT there was no name of the person listed – just “N/A” and an email.
When i went into the S2 member area to see if they were automatically entered, there was no such user.
I was under the impression that S2 requires the person’s name and i also have a mandatory field for the address as well.

Any thoughts on that!

Posted: Wednesday Sep 12th, 2012 at 7:47 am #24985

BUT there was no name of the person listed – just “N/A” and an email.

Could it be that the person entered “N/A” as the name? Does it also say “N/A” in his profile page?

I was under the impression that S2 requires the person’s name

s2Member can require the name if you set it that way. [hilite path]Dashboard -› s2Member® -› General Options -› Registration/Profile Fields -> Collect First/Last Names during Registration[/hilite]

Posted: Wednesday Sep 12th, 2012 at 9:00 am #25008
lisa carr
Username: pageadmin

Hi Cristian,

Yes, i did set the S2 options to collect first and last names during registration. And it looks like the person registered through the site and paid through paypal – but there is no record of this person in the S2 users area at all. I’ve searched for their email and N/A – because that’s all the info that i got from the Paypal email.
I went into the Paypal acct and it lists the name as N/A as well….the only extra info i was able to get in the Paypal acct was a company profile with a web address.
I’ve tried emailing the person with no reply as of yet……

If a person registers through the S2 form, and the first and last names (as well as the address) are required, how could it not transfer to the user section?

Posted: Wednesday Sep 12th, 2012 at 12:35 pm #25037
Eduan
Username: Eduan
Moderator

i added it and it looks like it works! There is a brief “flash” or glimpse of the members area page and then it re-loads the membership options page.

Great! Glad I was able to help. :)

You might be interested in making a little hack that recognizes the user’s level before the content loads, the reason there is that flash before redirecting is before it has to load it in order to redirect the user, and since it’s in the page’s content it won’t really be loaded until almost at the end. Just something to think about. :)

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