Forum: Xprofile Fields

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Xprofile Fields premium extension please open a new premium support ticket.

[Resolved]Only display BP members with a particular xprofile field?

Home Forums Xprofile Fields Only display BP members with a particular xprofile field?

This topic contains 5 replies, has 2 voices, and was last updated by  Eyal Fitoussi 5 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32820

    Jeff Metzger
    Participant

    I’m looking for a way to have an admin approve and verify members before having them display in the search results. Is there an easy way to do this?

    I was thinking I could just add a checkbox as a new xprofile field, then just have the admin check it off to approve the user.

    How can I do this in my custom results template?

    My Meta key is “member_approved”

    #32825

    Eyal Fitoussi
    Keymaster

    The way I see it you will need to use the filter :

    to exclude the users from the search results.

    You will need to run function ( using the filter ) that will do to things:
    1) Get the IDs of all members with the xprofile “member_approved” into an array.
    2) Excluded this array of IDs from the members search query by modifying its WHERE clause.

    #32824

    Eyal Fitoussi
    Keymaster

    My mistake. I above I suggested to exclude the array of IDs which actually they need to be included.
    The progress should be the same. Use the WHERE clause to query only the IDs in the array.

    #32823

    Jeff Metzger
    Participant

    Eyal, I’m not very familiar with filters. Can you give me an example of what that might look like? I’d be happy to pay for some custom support if needed. Thanks.

    #32822

    Eyal Fitoussi
    Keymaster

    Filters allow you to modify/replace part of a code.
    the filter:

    allows you to modify the members SQL query created by GEO my WP before the query is executed.
    the filter is in geo-my-wp/plugins/friends/includes/gmw-fl-search-funcitons.php around line 450. You can see the query happens just before above it.

    And as i mentioned above What I would probably do is get the IDs of all members with the xprofile “member_approved” into an array and exclude the array of IDs from the members search query by modifying its WHERE clause.

    #32821

    Eyal Fitoussi
    Keymaster

    And you are more than welcome to contact me in private at info@geomywp.com for custom work.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.