Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Protection – User must be logged but don't care what level

Simple Membership Plugin › Forums › Simple Membership Plugin › Protection – User must be logged but don't care what level

  • This topic has 10 replies, 3 voices, and was last updated 5 years, 8 months ago by Mike.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • September 10, 2020 at 5:52 pm #20871
    Mike
    Participant

    I’m sure this must have come up before but I can’t seem to locate it.

    I want to prevent access to a page unless you are logged in but I don’t care what level you are.

    Does just clicking the Yes. Protect this content radio button while not checking any levels do this?

    Or, would I have to check all levels?

    I feel like I should know this but having a brain freeze. Sorry if I am wasting someone’s time.

    Thanks much!
    Mike

    September 12, 2020 at 12:53 am #20873
    mbrsolution
    Moderator

    Hi,

    Does just clicking the Yes. Protect this content radio button while not checking any levels do this?

    Or, would I have to check all levels?

    You need to check all the levels that will have access to the content in question. Please also check the following documentation https://simple-membership-plugin.com/apply-content-protection/ which explains the whole process in details.

    Let me know if the above helps you.

    Thank you

    September 12, 2020 at 2:11 pm #20874
    Mike
    Participant

    Answers my question but for clarification –

    If I would add a new level in the future, I have to go back to all the protected posts & pages and check the new level?

    Or, is there some way to specify protection of a post for all membership levels – including any new ones added in the future?

    Thanks for your help!

    September 13, 2020 at 1:21 am #20876
    mbrsolution
    Moderator

    Hi,

    Check the following documentation https://simple-membership-plugin.com/apply-protection-posts-pages-bulk/. Let me know if this helps you.

    Thank you

    September 13, 2020 at 6:36 pm #20878
    Mike
    Participant

    Bulk protection – question about Step 2 – General Protection – documentation says “This will protect all the posts (you selected) from anyone”

    Does that mean that if I enable general protection (without any specific membership levels in Step 3) that literally ABSOLUTELY NO ONE can access the post – whether they are logged in or not?

    Or, does it mean that ONLY LOGGED IN users can access it? No matter what membership level they are?

    Sorry to seem so dense

    Mike

    September 13, 2020 at 11:36 pm #20879
    mbrsolution
    Moderator

    Hi, I understand that sometimes things can seem a bit confusing. So, what I suggest is for you to carry out a test.

    Protect a post but don’t select any membership level. Then try to access that post using a member that is not an administrator. Also make sure you use a different browser for this test or make sure you are logged out of the browser you are using. Let me know what happens.

    Thank you

    September 14, 2020 at 4:20 pm #20885
    Mike
    Participant

    As you requested, I used 2 different browsers – one for the development and one as a normal nonadministrator user.

    I created a test post – before any protetion, it displayed:

    This is a Test Post

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud etc.

    where “This is a Test Post” is a h1 header and Lorem, etc. is normal paragraph <p>

    Next, as you requested, I protected it but did not select any membership levels. When I tried to access it w/o logging in, I got the normal must be a member page – which is what I wanted:

    This is a Test Post

    You must be a TCGHS member to view this content!

    If you are a TCGHS member, please login.

    Not yet a Member? Consider joining us!

    Which is what I would of expected. Next, I logged in as a non-adminstrator user, I get:

    This is a Test Post

    but no content is shown. which seems odd to me – it showed me just the header – I would expect it to at show the entire page (preferred) or at least still show the “you must be a member” warning.

    Out of curiosity, I went back and selected a membership level in the post but NOT the level of the logged in user. Received the same result – heading but no content:

    This is a Test Post

    I’m sure I would have expected the “you must be a member” display on that one!

    Finally, I set the post to my user’s membership level and got:

    This is a Test Post

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud etc.

    which I think is correct.

    So, in summary, I think it works correctly when the post is not protected or is protected with the logged in user’s membership level.

    But, it seems incorrect to me for when it’s protected with no membership levels or with only membership levels different from the logged in user.

    September 14, 2020 at 10:37 pm #20888
    mbrsolution
    Moderator

    Hi,

    So, in summary, I think it works correctly when the post is not protected or is protected with the logged in user’s membership level.

    Yes that is the expected behavior of our plugin.

    But, it seems incorrect to me for when it’s protected with no membership levels or with only membership levels different from the logged in user.

    Why do you think it is incorrect? Can you provide more information?

    Thank you

    September 16, 2020 at 4:28 pm #20892
    Mike
    Participant

    Hi,

    My Original Understanding

    When a protected post is displayed, I thought that any user trying to access that post could only get one of two results:

    1. A post displaying the restricted post message text which consists of the header and the restricted post message

    or

    2. The post is displayed normally consisting of the header and normal post content.

    What is Actually Happening

    However, if a member is logged in with a different membership level than checked in the post protection setting there’s a third possibilty – post is displayed with only the Header with no content at all

    In other words, the user doesn’t get the normal content or a restricted post message – which would be totally confusing to the user even though your plugin treats it as a perfectly acceptable outcome.

    I would have expected such a user should have received the restricted post message text (since the restricted content is not being displayed).

    In my application, I only care whether you are logged in (don’t care about the level) so I can personally live with it by insuring a level is always checked.

    No Membership Level Selected Case

    As I said, in my case, I only need to restrict content based on whether the user is logged in – I don’t really care about what level. I only use levels to determine access expiration.

    So, my assumption was markinng the post “protect this content” was all I had to do. I expected If you weren’t logged in and tried to access the post, you would receive the restricted post message. But, actually, I just get the post’s header – no content and no restricted content message.

    But, if I’m interpreting you correctly, you are saying to get the effect I want, I must not just protect the content but also must mark all membership levels individually to allow access. Which means every time I add a new level, I have to go back to all my content and select the new level. Which I probably can do using the bulk update feature (if I don’t forget it is necessary).

    However, this is very confusing – it basically says marking “protect this content” without checking a membership level is an error – if so, I would think you need to require at least one membership level be selected with an appropriate error message.

    Or, for my case, it would be nice to have an “all levels” box in the Membership Levels with access list.

    Thanks for your patience.

    September 17, 2020 at 2:48 am #20905
    admin
    Keymaster

    Here is how it works:

    You must apply General protection first which takes permission off from the post/page. Then give access to the levels that you want to give access to. It is NOT an acceptable setting to apply general protection to a post/page if you don’t intend to also select one or more levels and then give access to it.

    There is a very good reason for us to do it this way. We will not change this behavior since many thousands of our users expect it to behave this way. You need to use a different plugin unfortunately.

    September 17, 2020 at 1:39 pm #20907
    Mike
    Participant

    I was just trying to explain what I was attempting to do – not a criticism.

    I really have no problem with your concept – I just didn’t fully understand how it worked. Although it would be nice to force the picking of a membership level so it would not be possible to use it incorrectly (like I did)

    It’s a great plugin – I just didn’t fully understand the ramifications of the member levels selection.

    Now that I understand, I will try to avoid the situation.

    Thanks for all your help,
    Mike

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy