Generating a list of user capabilities?

I was under the impression from this document

That this tag -> [current_user_ccaps]

Is supposed to produce a hyphenated list of custom capabilities, and apparently it does…
however lord knows what the specific language is supposed to be…
because this -> [s2Get constant=“S2MEMBER_CURRENT_USER_CCAPS”]
produces NOTHING.

Mind you I have edited a sample user so that I can see the capabilities that the test user should have and using this tag as written, i see NOTHING.

So my silly but long winded question is how should I form the S2GET statement so that I can show the list of capabilities that a user has ?

Anyone ???

Thanks,

Miles.

@barefootango:

$s2member_access_ccaps = get_user_field('s2member_access_ccaps'); # An array of Custom Capabilities the current User has (i.e. music,videos).

See this KBA: http://s2member.com/kb-article/s2get-shortcode-documentation/

thanks for the clarity, that was exactly what I was looking for. I had the syntax wrong.

now I just need to equate where X and Y is within the page structure.

now if I take that one step further, I should be able to create a simple PHP array to show what resources X matches with Y – where X is a CCAP, and Y is the link that it’s associated with.

It won’t be fully dynamic, but it’s better than hand coding the damned page.

Every time I add a page/resource I’ll have to update the array but once my products are set it shouldn’t be that difficult to do. This is an easy fix. Thanks!

If all you want is a list of links to which a member has access, why don’t you just use attach_s2member_query_filters(); and create your own loop? Then you’d never need to update anything by hand, no matter how many ccaps you create. Of course, you might get rather a long list!

Tim,

Now THAT is an interesting idea that I had not considered.

But you’re right though … it could be kinda big. But considering I’ll only have about 57 page-links to go through, and then to run that against the user’s ccap list. Should be a piece of cake. Thanks.

Miles.