Replies
- y2gabs on November 22, 2018 at 2:20 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18911
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'] ); } }
- y2gabs on November 22, 2018 at 2:17 pm 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?
- y2gabs on November 22, 2018 at 2:07 pm in reply to: Setting Member Types (with Members Types Pro) on user-new.php form #18908
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?