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.

list of ccap in php, just like the profile

Home › Forums › Community Forum › list of ccap in php, just like the profile

Tagged: ,

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 10 months ago.

Topic Author Topic
Posted: Monday Mar 12th, 2012 at 9:21 pm #7938

I need to get a list of all the ccap that a login has, just like in the profile. I have plenty of examples of using the user_has examples, but I want the whole list.

thanks

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Mar 13th, 2012 at 6:46 am #7974

Hi Marlin.

This should do the trick:
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

[hilite pre_code]
// An array of Custom Capabilities the current User has (i.e. music,videos).
$s2member_access_ccaps = get_user_field('s2member_access_ccaps');
[/hilite]

I hope it helps!

Posted: Tuesday Mar 13th, 2012 at 8:07 am #7984

Perfecto!
Ty Cristian

Posted: Tuesday Mar 13th, 2012 at 4:20 pm #8047

You’re welcome! :)

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