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.

Can't receive the users CCAPS values

Home Forums Community Forum Can't receive the users CCAPS values

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 6 months ago.

Topic Author Topic
Posted: Wednesday Jun 13th, 2012 at 7:20 am #16354
Robert H.
Username: robaggio

Hello,
I have two problems.
1.
I can’t receive the users CCAPS values.
If I enter

[s2Get user_field="s2member_access_ccaps" /]

I get back “Array” as result.
I’d like to display the custom capabilities of each user on their membership page.

2.
I’d like also to receive the cv2 value for the user custom field without the domain prefix on the users membership page.

[s2Get user_field="s2member_custom" /]

–> result – mydomain.com|cv2
Is there a way to receive CV2 without the CV1 prefix “mydomain.com”?

Thanks for your help.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Jun 14th, 2012 at 4:29 am #16415

Hi Robert.

The ccaps are stored as capabilities in usermeta. You’ll need to use PHP to get them.

[hilite pre_code]

[/hilite]

That’ll return an array. You’ll need to go throught it and pick out the ones that are s2Member custom capabilities.

The custom field is that whole string. You can explode it in PHP to get the cv1. http://php.net/explode

[hilite pre_code]

[/hilite]

I hope that helps. :)

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