This is because you picked ‘none’ for the default role. People have to have a role to get in, so make that Subscriber and see what happens.
I’ll document that better and come up with an error to point out that you MUST have a role. Having ‘none’ is possibly conflicting with other things.
By the way, why would have no user role and still want people to join the site? What were you expecting to happen in that scenario?
That explains it. Although far from intuitive. If you set none – manual – when you manually add you get a role option so one would assume the role selected at add user applies. Infact it takes the plugin role, which then requires a second edit to set the desired role.
I actually only want external enrolement on a couple of subzites, but as plugin activates on all.
Excuze typos posting from phone
Yeah, I’m going to change that so the plugin doesn’t run if you have -none- because logically “Well you added someone with NO role via the plugin.”
Though it shouldn’t impact manually adding people from the back end at all! How are you adding them? /site/wp-admin/users.php or /wp-admin/network…?
Huh…. Okay the DEFAULT is ‘Subscriber’ so you changed that to none on purpose. I’ll make an alert to point out why this is bad.
Well, I don’t think the issue is with your plugin, but with perhaps some other plugin in my multi-site.
I managed to get it working, i.e. manual add by superuser not creating a user with no rights, and now I can’t get it to ‘break ‘ again.
I’m going to have to try out a few options on on a different build and see if I can recreate the issue.
For me the default was definitely ‘none’ . I’ll report back, but as I said I don’t think it is you, it is probably something else. Finding out what may take some time.
I just installed it on a multi-site that it has never been on (3.7.1) and the default is definitely -none- for me
http://i42.tinypic.com/2rw6yp5.png
OK on a multi-site with NO other plugins I get sensible defaults
http://i44.tinypic.com/nei4oj.png
now the process to eliminate 50 plugins ugh!
I”m removing ‘None’ as an option, since it’s a useless idea π So that should help a little!
OK, it is your code that isn’t setting the default correctly.
Line 121 of settings.php uses an option default_user_role that isn’t defined prior, so will come up with -none-
<?php wp_dropdown_roles( get_option( 'default_user_role' ) ); ?>
(wordpress does have an option default_role but that is different)
If this were set, in defines.php say after lines 30-37
if (!get_option( 'helfjmm_options' )) {
$jmm_options = get_option( 'helfjmm_options' );
if ( !isset($jmm_options['type']) ) $jmm_options['type'] = '3';
if ( !isset($jmm_options['role']) ) $jmm_options['role'] = 'subscriber';
if ( !isset($jmm_options['persite']) ) $jmm_options['persite'] = '0';
if ( !isset($jmm_options['perpage']) ) $jmm_options['perpage'] = 'XXXXXX'; // blank
update_option('helfjmm_options', $jmm_options);
}
with
if (!get_option( 'helfjmm_options' )) {
$jmm_options = get_option( 'helfjmm_options' );
if ( !isset($jmm_options['type']) ) $jmm_options['type'] = '3';
if ( !isset($jmm_options['role']) ) $jmm_options['role'] = 'subscriber';
if ( !isset($jmm_options['persite']) ) $jmm_options['persite'] = '0';
if ( !isset($jmm_options['perpage']) ) $jmm_options['perpage'] = 'XXXXXX'; // blank
update_option('helfjmm_options', $jmm_options);
}
if (!get_option( 'default_user_role' )) {
update_option('default_user_role', 'subscriber');
}
[ Although it may have been your intention to actually use ‘default_role’ rather than ‘default_user_role’ but I haven’t looked into that ]
I think that the missing ‘default_user_role’ explains my ‘irrational response’ because when it was missing nothing works, but of course doing an update creates it and fixes the problem. I’m of course assuming ‘default_user_role’ is pivotal to the main code (which I haven’t looked at, just the admin settings).
default_user_role()
is an ‘old’ WMPU function….
Though it should have been called like this:
<?php wp_dropdown_roles( get_site_option( 'default_user_role' ) ); ?>
Bad me. I wonder if your other plugins were changing the userroles on a different site and that’s why it’s borking. Also it looks like that was …. vanished. GUH.
Okay then!
<?php wp_dropdown_roles( get_site_option( 'default_role' ) ); ?>
would be a simplier fix, neh? I’m testing it locally, but if that (also) works for you, then I’m going to call that a turkey and baste it.
Er… Sorry.
I’m sure you’ll hav eit covered, but don’t forget to change the update_option(‘default… on line 36 too
and in other places where that option is used like shortcode.php, if you go down the route of changing the option name.
Anyway glad to have been able to help.
DOH. I’m giving you a shoutout in this update, friend!
grep default_user_role….