BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #36973

    Hi Brajesh…

    Some news about my issue?

    Thanks in advance.

    Regards;

    Ricardo

  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #22220

    ¡Hi Brajesh!

    Many Thanks, the function you sent me, it seems is working very well!!

    I just have this doubt…

    What happens with user role if the register form allow to choose other role than “suscriber”? Is replaced by ‘suscriber’ as the code you sent me are defined in function or its just ignored?

    And a last question… How can assign more than one role in ‘add_user_to_blog()’ function?

    I’m a really grateful with your help and this great service for us the “simple mortals” 🙂 trying in what you are a Hero!

    Have a great day..!

    RICK

  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #22073

    Hi Brajesh…

    Please, you do not need to apologize, on the contrary, forgive me for bothering you so much about this matter.

    Answering to your interrogant:
    YES, the registration form is in the subsite, and all new users added by this form are listing well in the users list in their respective subsite admin dashboard.

    I imagine that some function can be added by the hook “user_register” as you suggest so the other plugins register methods can add new users to the currently blog and sync with BP-Multi-Nertwork plugin.

    Could you give me some clue or better if is an example? 🙂

    I’m very grateful for your time to reply my messages.

    Many thanks Brajesh.

    • This reply was modified 5 years, 7 months ago by RickHN.
  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #22043

    Hello…

    Some help with previous messages?

    There is some possibility to add an sync function to MultiNetwork Plugin? (in cases some plugins do not registering new users with “add_user_to_blog()” function?)

    Could “get_blogs_of_user()” function be useful?

    Thanks for reply

  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #21754

    (Correction for last paragraph in previous post)

    …Or there are some way to hook the “add_user_to_blog()” function for any third party plugin that adding new users without it? (Maybe I’m saying nonsense here hehe)

    Thanks for your patient Brajesh.

  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #21745

    Brajesh… Thanks again for you kindly response.

    It would help using the “get_blogs_of_user()” function of wordpress? To determine which blog the users should go?

    I barely do “play” with PHP and WP Functions code and did some test with “get_blogs_of_user()” to get what blog te user belongs and it seems works getting the “userblog_id”.

    This is the function:

    
    
    function ofi_mostrar_blog_de_usuario(){
        if ( is_user_logged_in() ) { // && is_user_member_of_blog() 
            $user_id = get_current_user_id();
            $user_blogs = get_blogs_of_user( $user_id );
            echo '<h1>User '.$user_id.'\'s blogs:<ul>';
            foreach ($user_blogs AS $user_blog) {
                echo '<li>'.$user_blog->userblog_id.'</li></h1>';
            }
    
            $all_meta_for_user = array_map( function( $a ){ return $a[0]; }, get_user_meta( $user_id ) );
            print_r( $all_meta_for_user );
        }
    }
    add_action('wp_head', 'ofi_mostrar_blog_de_usuario'); 
    
    

    Some advice or help to adapt this to an automatic or cron job function to sync users so appearing in their respective blog bp activity?

    Or there are some way to hook the “get_blogs_of_user()” functions for any third party plugin that adding new users without it? (Maybe I’m saying nonsense here hehe)

    Thanks for your patient Brajesh.

    • This reply was modified 5 years, 8 months ago by RickHN.
    • This reply was modified 5 years, 8 months ago by RickHN.
  • Participant
    Level: Initiated
    Posts: 15
    RickHN on #21695

    ¡Many Thanks Brajesh…! You are the best.. you rock with your quickly responses and help.

    I’ll will do contact these plugins developers.

    IN CASE THE DEVELOPERS SAY THEY CANNOT MAKE THIS CHANGE… There is some way to make some kind of cron or manual function to add/activate users to the “xx_bp_mnetwork_users” table??? (I did test adding a user directly to the “xx_bp_mnetwork_users” table and seems working but I would like to find an automatic solution to run this task, just in case)

    Some help or advice?

    • This reply was modified 5 years, 8 months ago by RickHN.