New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] buddypress Deactivate Account Plugin #18919

    Hi Jeff,

    Please remove the code from p-deactivate-functions.php and put it in wp-content/plugins/bp-custom.php

    If there is no bp-custom.php, please create a php file named bp-custom.php

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Irina,
    on 4.9.8 it is part of the core.

    My guess is it is either Youzer or the theme. Try disabling Youzer and then checking it.

    If that does not work and if the site is still in development, please try switching theme and checking again.

    Let me know what you find there.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: Buddyblog category/tag display #18917

    Hi Irina,

    The Form supports dropdown but BuddyBlog does not uses it currently. If you can tell me the taxonomy(category, tags or custom taxonomy), I can help with some code to make it use selectbox.

    I will add it as a setting option in future version of BuddyBlog.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Sure, Here is the functiona updated again.

    
    
    function mktbn_user_register( $user_id )
    {
    	if ( function_exists( 'mikakoo_log' ) ) {
    		mikakoo_log( 'user_register: ' . $user_id );
    	}
    
    	if ( ! empty( $_POST['MemberType'] ) && function_exists( 'bp_set_member_type' ) ) {
    		bp_set_member_type( $user_id, $_POST['MemberType'] );
    	}
    
    	$user = get_user_by( 'id', $user_id );
    
    	// if member type submitted and valid user and the person adding user is super admin
        // then set role too.
    	if ( $user && ! empty( $_POST['MemberType'] ) && is_super_admin() ) {
    	    $user->set_role($_POST['MemberType'] );
    	}
    
    }
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    HI Jeff,
    Thank you. Your code is correct. If it is giving 500 error, It means one of the used function does not exist.

    I have slightly modified the function, Please change the function with this one and then let me know if it works or not?

    
    
    function mktbn_user_register( $user_id )
    {
    	if ( function_exists( 'mikakoo_log' ) ) {
    		mikakoo_log( 'user_register: ' . $user_id );
    	}
    
    	if ( ! empty( $_POST['MemberType'] ) && function_exists( 'bp_set_member_type' ) ) {
    		bp_set_member_type( $user_id, $_POST['MemberType'] );
    	}
    
    }
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Jeff,
    Please share the complete code for function mktbn_user_register()

    Most probably there is some syntaxt error causing it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Irina,
    Thank you for posting.

    I am sorry for the inconvenience.

    Is there anything special about the site like are you on WordPress 5.0 beta? Is there any chance that you are not using the tinymce editor?

    Also, which theme it is? Is it some custom theme? Are they adding any visual posting section on their own?

    About the upload:- If it only happens sometimes, It is most probably a hosting or some plugin throwing notice causing it. If it happens all the time, Please enable WP_DEBUG and let me know the error.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: font awesome icons in tabs #18905

    Thank you Phil.
    Please allow me a few hours to check this function and get back to you.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Keith,
    Thank you.

    I am sorry for the trouble. Certainly we can do that. Please allow me to update the widget today/tomorrow and get back to you.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] buddypress Deactivate Account Plugin #18903

    Hi Jeff,
    We have a filter to allow any user to act as admin for deactivation.

    Here is an example where I am checking if the current user is editor and if it is true, we allow to see the button and do it for other users.

    
    
    /**
     * @param $allow
     *
     * @return bool
     */
    function buddydev_custom_deactivator_permission( $allow ) {
    
    	// let us allow editors.
    	if ( ! $allow ) {
    		$allow = current_user_can( 'delete_others_posts' );
    	}
    
    	return $allow;
    }
    
    add_filter( 'bp_account_deactivator_user_can_change_account_status', 'buddydev_custom_deactivator_permission' );
    
    

    If you have a custom role, You may be using some custom capability. You can swap the capability with your own.

    Please let me know if it works.

    Regards
    Brajesh