Replies
- Brajesh Singh on November 5, 2020 at 11:16 pm in reply to: Bulk reset profile visibility fur users bp_xprofile_visibility_levels #34352
Hi Dorian,
Thank you for the reply.Yes, It should work fine for the REST API.
Please put this in wp-content/plugins/bp-custom.php
/** * Ensures default profile fields visibility is used while displaying profile * * It is only applied if user has not saved any custom visibility. */ function budydev_ensure_default_xprofile_field_data_visibility_for_user( $value, $object_id, $meta_key ) { if ( 'bp_xprofile_visibility_levels' !== $meta_key ) { return $value; } // let us use a static cache since the default visibilites won't change during a request. static $default_visibilities = null; if ( ! is_null( $default_visibilities ) ) { return $default_visibilities; } $visibilities = BP_XProfile_Group::fetch_default_visibility_levels(); foreach ( $visibilities as $field_id => $visibility ) { $default_visibilities[ $field_id ] = isset( $visibility['default'] ) ? $visibility['default'] : 'public'; } return $default_visibilities; } add_filter( 'default_user_metadata', 'budydev_ensure_default_xprofile_field_data_visibility_for_user', 10, 3 );It will ensure that whatever you set as the default visibility for the profile field will be used for users who haven’t updated their profile data.
Please let me know if it works for you or not?
Regards
BrajeshPS:- Please do not copy code from email notification. It is entity encoded. Use the code from this post on forum.
- Brajesh Singh on November 5, 2020 at 10:43 pm in reply to: [Resolved] (paying optional) New Field Group on Registration Page Not Showing #34350
Hi Saleam,
Thank you for the patience.For the time being, I have put this code at the bottom of your theme’s function.php
// show all profile field groups on BuddyPress registration. add_filter( 'bp_after_has_profile_parse_args', function ( $args ) { if ( ! bp_is_register_page() ) { return $args; } // BuddyPress does not allow us fetch multiple group using id but it does allows excluding. $args['profile_group_id'] = false; $args['exclude_groups'] = []; return $args; } );Please check if the registration is working or not(by registering a new account). If it does not, we may need to change a Youzer template file.
This change will be lost when you will update your theme in future. I will recommend using child theme or putting the code in wp-content/plugins/bp-custom.php
I was not able to put it in bp-custom.php as I don’t have access to FTP.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 9:00 pm in reply to: Option for moderating and approving new members at signup #34345
Hi Carsten,
Thank you for the question.We do not plat to add the registration moderation currently.
We are releasing a profile data moderation addon(allows you to monitor profile data for any change by user and approve/reject them) next week.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 8:59 pm in reply to: Users appear in Members Directory but not in the list of users in the Dashboard? #34344
I am sorry but I am not sure of your reply.
If the users are still there in database, It means they were not deleted completely. I will suggest disabling all plugins and trying to find out the culprit if any.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 8:58 pm in reply to: [Resolved] (paying optional) New Field Group on Registration Page Not Showing #34343
Hi Saleam,
Thank you.Please confirm that you want all the fields from both the profile field groups to appear on registration page.
PS:- I will not be making any changes in the settings and will let you know which template files I changed.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 8:25 pm in reply to: Bulk reset profile visibility fur users bp_xprofile_visibility_levels #34338
Hi Dorian,
Welcome to BuddyDev forums.The User Profile fields data visibility is stored in user meta as an associative array of field ids as key and visibility levels as value
Example
array( 1=> ‘public’, 2=>’private’ and so on) where 1, 2 etc are field ids.Deleting the old value will make all the fields public(except if you have an enforced visibility option set foe the field).
If your goal is not to enforce a default visibility all the time, just doing it when this was not set by the user(I am assuming you deleted the meta key), we can use two approaches:-
1. Bulk update usermeta for each user via phpmyadmin and set the value for ‘bp_xprofile_visibility_levels’ as the serialized value of our expected setting
2. Or the easier route is to filter on the value of the user meta ‘bp_xprofile_visibility_levels’ and if it is empty(you deleted all, if the user updated it, It won’t be empty), we return the default fields visibility.
Which route will you like to use? Please let me know and I will assist.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 8:24 pm in reply to: Users appear in Members Directory but not in the list of users in the Dashboard? #34337
Hi Carsten,
Thank you for the reply.Please visit Cpanel and search for phpmyadmin, open it and you will have access to database. The tables are listed there.
Please do not delete anything from there just check for the users.
Regards
Brajesh - Brajesh Singh on November 5, 2020 at 8:01 pm in reply to: Users appear in Members Directory but not in the list of users in the Dashboard? #34335
Hi Carsten,
That’s strange.is there any chance you are on a multisite? In case of multisite, the user should be deleted from Network Admin->Users screen.
If not, Please check wp_users table and see if the deleted users are present or not? They should not be there.
If they are, something is disabling complete deletion of users.Regards
Brajesh - Brajesh Singh on November 5, 2020 at 7:40 pm in reply to: [Resolved] (paying optional) New Field Group on Registration Page Not Showing #34332This reply has been marked as private.
- Brajesh Singh on November 5, 2020 at 7:17 pm in reply to: [Resolved] (paying optional) New Field Group on Registration Page Not Showing #34329
Hi Saleam,
Thank you for the reply.I appreciate you joining our membership.
It is strange is a field from non primary group appeared on registration. That is not normal behaviour for BuddyPress(unless a theme/plugin modifies it).
Please use “Private Reply” checkbox here for sharing credentials.
You can share the theme via google drive or something similar and link me here in a private reply.
Thank you
Brajesh