Replies
- Brajesh Singh on March 16, 2018 at 11:49 pm in reply to: [Resolved] How to remove buddypress user from all groups #13894
Hi MWale,
In your case, the best way will be to trigger removal when the membership is deactivated
Most probably the following code should work.
function mwale_remove_from_group_on_membership_deactivate( $event, $subscription ) { $member = $subscription->get_member(); $user = $member->get_user(); if ( ! $user || is_a( $user, 'WP_User' ) ) { return; } groups_remove_data_for_user( $user->ID ); } add_action( 'ms_model_event_deactivated', 'mwale_remove_from_group_on_membership_deactivate', 10, 2 );I don’t use the membership2 plugin, so I might have used incorrect api in the following
$member = $subscription->get_member(); $user = $member->get_user();If you can check with their support, that will be nice.
Try the above code and try cancelling a user’s membership. Does that work?
Best Regards
Brajesh - Brajesh Singh on March 16, 2018 at 11:27 pm in reply to: [Resolved] automatic change of type with Member Types Pro #13892
Hi Herve,
Please comment this line
https://gist.github.com/sbrajesh/238153f70f770f957fd1c4b2ba60be77#file-profile-completion-buddypress-php-L93That will do it for future.
- Brajesh Singh on March 16, 2018 at 11:25 pm in reply to: [Resolved] howto define member type url slugs without default "/members/" #13891
Hi Leland,
Thank you for posting.I am sorry but that will be almost rewriting the url parser for BuddyPress.
In BuddyPress, the profile url structure is not very flexible. It will need a lot of work which does not seem worth the outcome to me.
- Brajesh Singh on March 16, 2018 at 11:22 pm in reply to: [Resolved] load newest following activity auto refresh… #13889
Thank you for the kind words Giuly.
Have a nice weekend.Best Regards
Brajesh - This reply has been marked as private.
Hi Shelley,
In the text “Editing Base”, the text “Base” is name of your profile group. You can change it from Dashboard->Users->Profile Fields and then editing the field group name.If you want to edit the “Editing %s” text, It is coming from Community Builder. Please translate Community Builder’s po file for the same.
Regards
Brajesh- Brajesh Singh on March 16, 2018 at 11:18 pm in reply to: images not uploading. on activity stream #13886
Is it still giving the same error?
Can you please link me to the site with a temporary guest account?
Thank you
Brajesh Hi Madhavi,
sorry we don’t allow uploads here. In future, you may use imgur or similar services.I have received your email and will be getting back to you shortly about that.
Brajesh
- Brajesh Singh on March 16, 2018 at 12:29 pm in reply to: [Resolved] Buddyblog: Insert post image button doesn't show on Media menu. #13873
Thank you PresPhuture.
I am glad it is resolved for you.Have a great weekend to you too.
Best Regards
Brajesh Hi Shelley,
It is feasible to do but we will need to put some code in child theme’s functions.phpWill be comfortable with it?
Best Regards
Brajesh