BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 23

    Thank you sir!

    
    //  add fields to new user form
    add_action( 'user_new_form', 'mktbn_user_new_form' );
    
    function mktbn_user_new_form()
    {
    ?>    
    
    <table class="form-table">
        <tbody>
        <tr class="form-field">
            <th scope="row"><label for="Member type">Community Member Type</label></th>
            <td>
      <select name="MemberType">
      	<option value="type1">Member Type 1</option>
      	<option value="type2">Member Type 2</option>
     	<option value="type3">Member Type 3</option>
      	
      </select>
           </td>
        </tr>    
    
        </tbody>
    </table>
    
    <?php   
    }
    
    //  process the extra fields for new user form
    add_action( 'user_register', 'mktbn_user_register', 10, 1 );
    
    function mktbn_user_register( $user_id )
    {
        mikakoo_log( 'user_register: ' . $user_id );
    
            if ( ! empty( $_POST['MemberType'] ) ) {
    	bp_set_member_type( $user_id, $_POST['MemberType'] );
    		}
        
    }
    
  • Participant
    Level: Enlightened
    Posts: 23
    y2gabs on in reply to: [Resolved] buddypress Deactivate Account Plugin #18910

    Thank you sir. I’m sticking with the editor role so this should work. I’ve added this code to the bp-deactivate-functions.php (assuming that’s the right place?) but I still don’t see the button when logged in as user with editor role.

    Any thoughts?

  • Participant
    Level: Enlightened
    Posts: 23

    Hi there, thank you for your reply! unfortunately this code seems to generate a http 500 internal error. The user gets created, then the page refreshes to internal 500 error, and the member type is not assigned. Any thoughts?