• Resolved brashell

    (@brashell)


    I tried using this code, that you had on your site. My site then crashed with function errors etc. So I tried this plugin, #1 it didn’t work #2 I just want to make it automatic so they become subscriber for all sites, and not give the admins the choice to choose or for me to have to select each one. I also tried removing the ; right when the php tag opens “I left it in here” and right after it ends. It fixed the crash but still didn’t work. Please help..

    <;?php

    /*
    Plugin Name: Add Users
    Description: Add users to blogs when they visit.
    */

    function helf_add_users( ) {
    global $current_user, $blog_id;

    if(!is_user_logged_in())
    return false;

    if( !is_user_member_of_blog() ) {
    add_user_to_blog($blog_id, $current_user->ID, “subscriber”);
    }
    }

    add_action( ‘wp’ , ‘helf_add_users’ , 10);

    ?>;

    https://www.ads-software.com/plugins/join-my-multisite/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter brashell

    (@brashell)

    And yes it was put in the mu-plugins directory.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    1) JMM doesn’t go in the mu-plugins folder, so you’ve done a lot of setup wrong.

    2) If you want to have people auto registered to sites, this is the wrong plugin to use, you want this instead: https://www.ads-software.com/plugins/multisite-user-management/

    Thread Starter brashell

    (@brashell)

    No, the code snippet above was installed in the mu-plugins folder, and I do want the users to be auto registered but I don’t want to have to set each site to subscriber as the setting as that is what it is going to be for all of it.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Oh for.. You’re not using the PLUGIN, you’re using this code: https://halfelf.org/2012/more-multisite-registration/

    Dude, uninstall JMM the plugin NOW. Having both is what’s breaking things. Well, that and your opening PHP has a ; in it.

    Anyway, you’re not using this plugin, you’re using an unsupported little code tidbit. I’m marking this post resolved, since you’re trying to remove all the added functionality in JMM anyway. You don’t want to use my plugin, for this use case, so please stop.

    Fix your PHP to remove the semi colon. No idea how that got in there.

    Thread Starter brashell

    (@brashell)

    Fixed the PHP, removed plugin, isn’t working. What can I use to get it to work? It keeps setting all the users to no role on blogs. I need them set as subscriber so they can view a part of the dashboard.

    Thread Starter brashell

    (@brashell)

    I also tried it without the tidbit of code, still didn’t work with just your plugin. Need some help here please. I know its not supported, but you know how to make the overall functionality occur.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    There’s an additional ; at the end, but past that, I’m sorry, you’re on your own.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Broke my site, then fixed, did nothing, then did nothing again. Help!’ is closed to new replies.