Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Setting up Member Types #13371

    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 name

    Or 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
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Member Type Email & Configuration #13369

    Hi 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

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] BuddyPress Ajax Registration #13368
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] BuddyPress Ajax Registration #13365
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] BuddyPress Ajax Registration #13362
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] BuddyPress Ajax Registration #13358
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Groups name change #13355

    Hi Shelley,
    Can you please share a screenshot and link me here for the sidebar menu dropdown? I can quickly point to the text needing translation.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] BuddyPress Ajax Registration #13354

    Hi Bo,
    Please link me to your site.
    Also, you can provide the ftp login via our contact form here.
    https://buddydev.com/contact/

    Temporary dashboard details can be shared via this forum ( By marking a reply as privet).

    I am looking forward to assist you promptly.

    Regards
    Brajesh