@envieme
I can’t recall it but I have seen this issue on the forums before when it dealt with importing members and not respecting the default profile visibility. Maybe a search through the forums will help and if I am not wrong it was resolved so maybe doing a search can help. If not perhaps another volunteer will provide you a better solution. Good luck!
@bp-help Thanks for reverting back quickly. I did search before I posted and the only one that found similar to my case was https://buddypress.org/support/topic/how-do-i-hide-extended-profile-fileds-from-users/
But I haven’t used the plugin the post mentions about, I did a backend database import by exporting and importing sql.
And I have done all the standard steps I do when something is amiss in WP or BP like deactivating all plugins and reverting to default theme. Yet the problem persists. Further I noticed in my DB that a meta field bp_xprofile_visibility_levels is only set for a handful of users in the users_meta table. Though it being set doesn’t really set the visibility level properly.
Have you tried confirming this behavior on a fresh install? If so i’d put in a trac ticket otherwise you’re probably going to be on your own for that one. It’s possible your import process is the root of the cause.
I haven’t tested it on a fresh install and assume the problem is with my instance. May be after the import something got messed up.
But then when new members register, I expect Buddypress should be setting the default profile visibility settings which is not the case.
Any ideas on what could have gone wrong would be really helpful. Thanks.
Hi there, just nudging to see if there’s a work around or hack in BP code I can do to enforce desired x-profile visibility levels as in my case users need not have an option to choose their visibility levels. So I hope someone can point me in the right direction on how to hardcode the visibility levels for my x-profile fields in the code.
Many thanks.
Above my php paygrade (0) sorry. Maybe someone else has an idea.
Just one more nudge on this. As this is really important in securing the privacy on my site members.
I was successfully able to set my own profile privacy levels editing it from front end. So I see the bp-x-profile-visibility-levels field in user_meta table with value:
a:7:{i:1;s:6:”public”;i:2;s:8:”loggedin”;i:3;s:8:”loggedin”;i:4;s:8:”loggedin”;i:7;s:10:”adminsonly”;i:8;s:10:”adminsonly”;i:11;s:6:”public”;}
Is there a simple SQL that I can execute to make all users get this field in their user meta and set to this value? Can someone with SQL knowledge help?
Thanks
I have this exact same issue and need to fix it ASAP. Anyone have a solution?
Same issue (details below)
In this file {themename}\members\single\member-header.php, is the following code:
<?php
/***
* If you'd like to show specific profile fields here use:
* bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
*/
do_action( 'bp_profile_header_meta' );
?>
I have some custom profile fields, so I replaced the ‘do_action’ with these:
<h3>About Me<h3>
<?php bp_member_profile_data( 'field=About' ); ?>
<h3>Birthday</h3>
<?php bp_member_profile_data( 'field=Birthday' ); ?>
When I click on the Edit Profile link, I can change visibility settings, and it appears to save them. BUT the saved settings don’t do anything. In another browser where I’m not logged in at all, I can always see all of the fields listed, no matter which settings were chosen.
Advice?
if this is a common problem someone should add a ticket in trac.
I’m new so I don’t know what trac is, and whether this is an issue or if I’m doing it wrong.
trac.buddypress.org sounds like a bug to me.
Visibility checks are not done when profile data is retrieved ‘outside’ BP_XProfile_Group.
You can use bp_xprofile_get_hidden_fields_for_user() to do your own check.
It is reasonable to expect bp_member_profile_data() to include an argument re visibility check.
So it’s not a bug, but you can create an enhancement request ticket on trac.
Hi have a very similar issue and I think it may be related to the same cause.
I have set up a xprofile group where I have a bunch of different radio fields like so…
About You Widget
Show | Hide
Display Avatar On Profile
Show | Hide
Subscribed Member Badge
Show | Hide
etc.
I have put code all around my website to show or hide things according to a users settings and it all works as it should BUT, the only problem is that the settings don’t take effect until a user goes to edit the particular profile group and clicks the ‘Save Changes’ button.
Even though the defaults are set as they should be initially, they do not actually work until the user saves them.
Any help on this issue would be much appreciated.
Thanks