Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to make Profile fields visible only to admins?

Viewing 11 replies - 1 through 11 (of 11 total)

  • modemlooper
    Moderator

    @modemlooper

    Go into the wp-admin Users > Profile fields and change the visibility options to profiles fields


    robotnjik
    Participant

    @robotnjik

    @modemlooper Yes, there are options:

    Anyone
    Logged In Users
    My Friends

    and enforce one of those values. The problem is, I need some fields to be visible only to admin or hidden from other members.

    Example:
    First Name (visible to anyone)
    Last Name (visible to anyone)
    Birth date (let’s user decide who will see this field)
    Passport No (visible only to admin, cause it’s sensitive data)

    In plugin I mentioned above, that worked. Now, when I install that plugin, “only admins” option appears but doesn’t work and I’m looking for alternative.


    Paul Wong-Gibbs
    Keymaster

    @djpaul

    If a plugin doesn’t work, you need to contact its author for support. You’ll be glad to learn we’ve added this into the 1.7 version of BuddyPress (which is still in development) so it will help in future.


    robotnjik
    Participant

    @robotnjik

    Then, those are great news!
    My site is still under construction and I was surprised when all hidden data suddenly went visible. That will be really bad for whole community. I think it’s better to rely on this future feature of BP and wait. Many thanks for this info. Anyway, I’ll inform plugin author about updating or fixing plugin.


    modemlooper
    Moderator

    @modemlooper

    You can choose the my friends option to at least block all fields to a users friends. You can also look over @boone code to add your own visibility options. https://github.com/boonebgorges/bbg-custom-bp-field-visibility


    robotnjik
    Participant

    @robotnjik

    @modemlooper Well, that’s plugin/solution I used but now is not working. As you can see, last time was updated 8 months ago. Probably is not anymore compatible with latest versions of BP.


    scorbic
    Participant

    @scorbic

    I just installed this plugin and it does work but it seems that previous policies are remembered so even if you change the site wise privacy policy on a field to “Admin Only” each registered user still has it’s old setting. If you set the field so that the user can change their policy then log in as that user and change it to “Admin only” the policy is correctly enforced. I haven’t had time to delve into the db and see where the setting is saved but I suspect that when the site wise policy on a field is set to be enforced each individual user has to be changed at the same time.


    scorbic
    Participant

    @scorbic

    Further, just had a quick look at the db, seems visibility levels are saved in the wp_usermeta field bp_xprofile_visibility_levels. Buddypress reads this field and enforces the policy there, so even though you have changed the site wide policy it still enforces the per user settings (if that makes any sense). What you need to do is update each users policies each time the site wide is changed. The plugin was only ever supposed to be an example on how to do it so I don’t think it is robust enough for a live server.


    Ben Hansen
    Participant

    @ubernaut

    @sorbic you’re probably right about it being an example or whatever cause i tried it with new fields and those didn’t work either at least for us.


    markkelly1982
    Participant

    @markkelly1982

    Just wondering, in future releases, will hidden profile field data be excluded from site member searches as well or is there a way to do this at the moment?


    haagsekak
    Participant

    @haagsekak

    @modemlooper Hi George, I have your BBG Custom BP Visibility plugin installed but since this will be a new feature on BP 1.7 do I need to deactivate the plugin to avoid a conflict?

    Also I have BP 1.6.4 installed but am dying to have 1.7 up and running, any idea when that version will be available? I know I can download the beta version but since I’m not a code guru by any means I prefer to do a standard upgrade via the plugin menu then doing it manually.

    What are your thoughts?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to make Profile fields visible only to admins?’ is closed to new replies.
Skip to toolbar