Using role in Buddypress profile search

Hi

I am using S2member Pro with Buddypress. I have managed to set the user roles to owner, borrower and both when the user registers. My problem is that when I want to search for members with these roles using BP Profile Search, I can’t find a field that contains these roles on the database. I have tried using the pseudo role type, and set it to be available to users with these roles but it returns nothing. I can see a field on the db that contains the S2 membership level, but no role.

Can you please tell me the best way to resolve this.

Thanks

How have you “set” them?

Have you checked the boxes for integration with BuddyPress in s2Member -> General Options -> Registration/Profile Fields & Options ?

Hi Tim,

Thanks for your reply.

Yes, I have managed to set them and the boxes are checked. My issue is that I want to have an invisable field on the xprofile which contains owner, borrower or both so the member can search for just owners or borrowers. The problem is that those ‘roles’ are not actually stored

I think there must be some code that converts the data stored in the database. This is what is stored ’ wpw3_capabilities a:1:{s:15:“s2member_level1”;b:1;}’ but when I look at the list of users, this user has a role of Owner which corresponds to s2member_level1.

I don’t know PHP, but have coded in the past so am happy to make changes, just don’t know what to add.

Cheers,

Louise

Louise,

I asked HOW you had set the roles. It’s important because just checking those boxes doesn’t do it.

Using the Membership Levels/Labels tab in S2member

[cid:7ad3a40c-853e-4f62-9ca5-5927290c089c]

[cid:68891bd6-b906-44aa-a9cb-6374b1849c43]

Am I missing something ?

Cheers,

Louise

Yes, I’m afraid so. Those settings don’t “set” the roles at all. As it explains to the right of the buttons, they just change the labels that WordPress uses on the admin pages.

So nothing on the front-end of the site or in the database is changed by these settings. That’s why you can’t find them when you look.

Ok, so that won’t sort my problem out. Do you have a solution please ?

You need to take a look at the s2Member KnowledgeBase to make sure you get precisely what you want. Try starting with this article: https://s2member.com/kb-article/buddypress-profile-fields-or-s2member-profile-fields/