Multiple custom capabilities question

My site has several educational video courses and I use S2Member to restrict access to them. I set the capability for each video in the Require Custom Capabilities? and then when they sign up via Paypal I allocate the custom capability to the customer.

On my new course there is one particular video which is repeated from another course, and so the member can access the video if he has say capability A or capability B.

My understanding is that although I can enter the two capabilities, comma delimited, in the Require Custom Capabilities? field, that would require the member needing BOTH capabilities (if they’ve subscribed to both courses then that would be the case, but if they are only enrolled in one course they would only have one of the capabilities)

How can I configure this to say the member only needs one or the other capabilities, i.e not both of them.

Thanks for any help,
Bernie

Hi,
I have found an official answer sur un sujet similaire: Click Here!
It seems that you could not use one capability OR another but only accumulate them as you say.
You must use shortcode or PHP Conditionals to get the desired behavior.
Thanks.

Thanks for the reply.

If I were to use a conditional statement, how would I make the restricted page behave like all the other restricted pages, i.e simply re-direct to the Membership Page. What would be the format of the conditional statement?

Hi,
In your place, I will associate a new capability to this common course, that I will add this capability to the members having access to this course.
Thus, members with this ability will have access to this course but no other unless they have other capabilities associated with other courses.
I hope I made myself clear.
Thanks.

No I don’t really understand that, let’s use an example:-

Videos on course A - requires members to have ‘CapabilityA’
Videos on course B - requires members to have ‘CapabilityB’

One specific video (i.e on one web page, about to be published) belongs in both courses, it currently has ‘CapabilityA’ . You say I can ‘Associate a new capability to this common course’, but it seems to me I can only do that by specifying that it requires both ‘CapabilityA’ and ‘CapabilityB’

In other words, I can only do an AND not an OR

My vision was rather:

  • Videos reserved for Course A - require members to have ‘CapabilityA’.
  • Videos reserved for Course B - require members to have ‘CapabilityB’.
  • Common Videos in Course A and Course B - require members to have ‘CapabilityC’.
    If Course A and Course B members are to have access to the ‘CapabilityC’ videos, they will have:
    Course A members: CapabilityA, CapabilityC.
    Course B members: CapabilityB, CapabilityC.
    But maybe I misunderstood your question.
    Thanks.

The problem with that solution is that the existing members who have ‘CapabilityA’ will no longer have access to the common video, as it now has ‘CapabilityC’.

I would somehow have to edit all the existing members to give them two capabilities.(A and C)

You can manually add ‘CapabiltyC’ to yours existing members in your “Users” section… If you have a lot of members, you should do this with a PHP loop.

Ok, thanks, but I think I’ll just ‘suck it in’ and allow full access to the common video. Much easier!

Thanks again for your replies, much appreciated

You’re welcome! I try to help anyone…

@bernieraffe, better do another copy of the video, and include it with the right course - clean and fast solution.

Well, can be better, but all other solution seemd to be more difficult.

That’s a very good idea, hadn’t thought of that, thanks!