This topic has 8 replies, 3 voices, and was last updated 10 years by sharmstr.

  • Author
  • #32929
     Sim2K
    Participant

    I would like to protect a link on my site for example …

    http://www.Site.com/info/GoldMembersOnly

    I need to check that they are a certain membership level before it shows the page, or takes them to the registration page/alternative link if they dont match the required level.

    Do I need to hardcode it, or is it a .htaccess file edit or is there an option for this?

    #32939
     sharmstr
    Moderator

    Isn’t that the whole point of PMPro? http://www.paidmembershipspro.com/features/members-only-settings-for-all-content-types/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #34031
     Sim2K
    Participant

    I know how to do that, thats easy ..

    OK let me be more specific, how so I protect this pages link …

    http://jamrockpeeps.com/simeon2k/profile/edit/group/2/

    … ?? As you will see, its not a standard page created by me, but its a page automatically created by Buddypress, not me. So how do I protect that link so only members with a certain level can update that part of their profile??

    Thats what I am asking about protecting a link, not a page created by me, so how do I protect that page link???

    #34176
     Sim2K
    Participant

    Sharmstr, can you figure this one out?

    #34179
     sharmstr
    Moderator

    Sorry, I dont use PMPro so I dont know anything about it.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #34180
     sharmstr
    Moderator

    … with that said, if there’s no way to do it directly with PMPro, you could probably do it in the buddypress code by comparing the logged in user membership level to the level that can access.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #34206
     Abe
    Keymaster

    Hi, please look at the settings added by the theme in Theme options – Memberships that allows you to restrict Buddypress pages

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #34375
     Sim2K
    Participant

    Hello Abe

    Thats not it either. I know about that and have that setup.

    I want to protect a link that is created by a plugin/any plugin. The example I gave is …

    http://jamrockpeeps.com/simeon2k/profile/edit/group/2/

    … and that link is created automatically by Buddypress. That links to the 2nd tab when a user updates their profile. Now the base/1st tab for updating their profile is ok for all to access, but I want to protect the link to the 2nd tab. This way, only people from a specific member level can load the link to that tab to edit their details on the 2nd tab. If you don’t have access to that level, you can’t access that link to that tab.

    Hope this makes more sense, this is why I am asking, how can I protect any link using PMPro as there are some plugin generated pages that I want to allow for only members of a certain level.

    I used to use s2members and that could do it and I have heard that PMPro can do it too.

    #34529
     sharmstr
    Moderator

    I’ve thought a bit about this. The /group/2 part points to a specific x-profile group which is a slug to the second profile group you created in user profile fields. (it has nothing to do with the position of the group in the profile menu).

    So, in your functions.php file, you might be able to do something like

    COPY CODE
    
    if (bp_the_profile_group() == "2" && pmpro_getMembershipLevelForUser($user_id) == member_has_access) {
    show the info
    }
    

    I dont use pmPro so I’m not sure what membership levels there but hopefully you get the point.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?