Replies
- Brajesh Singh on February 12, 2018 at 8:23 pm in reply to: [Resolved] BuddyPress Ajax Registration #13375This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 8:06 pm in reply to: Add or Change feature to add link/url to images. #13372
Hi Tara,
Welcome to BuddyDev.Linking to the original thread for more details on the topic.
https://wordpress.org/support/topic/use-wordpress-media-uploader-with-mediapress/Regards
Brajesh Hi Neil,
Thank you.My apologies for the delayed reply. I have been planning a solution for the scenario.
Will it be feasible if the same BuddyPress Registration form allowed registering all users? You can send the users a registration form like
http://example.com/register/?mtp-ref=the_member_type nameOr we can allow you to add some unique ids(any random hash) for each member type and pass that here.
As I see, you don’t want your new users to select their member type manually. It should be prefilled based on the url.
In that case, we can use a strategy to achieve it.
Thank you
BrajeshHi Mohammad,
Sorry, I kept you waiting for such a long time.Please use the updated code
function buddydev_assign_member_type_on_registration( $user_id, $data ) { // replace =gender with your field name $gender = isset( $data['gender'] ) ? $data['gender'] : ''; if ( ! empty( $gender ) ) { if ( 'male' == $gender ) { bp_set_member_type( $user_id, 'member_type_name' ); // please change member type with valid member type. } elseif ( 'female' == $gender ) { bp_set_member_type( $user_id, 'member_type_name' ); // please change member type with valid member type. } } } add_action( 'arm_after_add_new_user', 'buddydev_assign_member_type_on_registration', 10, 2 );Please make sure to change the member_type_name with appropriate member types(The unique name/key) as registered.
Also, if it does not work in bp-custom.php, please put it in your theme’s functions.php
Please let me know how it goes.
Regards
Brajesh- Brajesh Singh on February 12, 2018 at 7:49 pm in reply to: [Resolved] BuddyPress Ajax Registration #13368This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 7:38 pm in reply to: [Resolved] BuddyPress Ajax Registration #13365This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 7:26 pm in reply to: [Resolved] BuddyPress Ajax Registration #13362This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 6:30 pm in reply to: Problem Using Conditional Profile Fields for BuddyPress Plugin #13359This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 6:24 pm in reply to: [Resolved] BuddyPress Ajax Registration #13358This reply has been marked as private.
- Brajesh Singh on February 12, 2018 at 6:12 pm in reply to: Problem Using Conditional Profile Fields for BuddyPress Plugin #13356This reply has been marked as private.