At the moment no, the default is a hard set to not be active by default. Are you allowing users to register a new site and you want them to immediately have the public register new user accounts within the new site?
I could add a filter in for the setting so that you could hook in using your site template function.php to overwrite this, but I’d like to understand what you are attempting to do first.
..Justin
Yup, you got it. Optimally, users can register new sites and I want the public to be able to signup as users under that site by default.
A filter to override the value would be perfect when/if you have time!
Thanks,
Noel
Actually looking again I have put in a filter for the whole settings array called ‘nsur_settings’. Unfortunately I can’t test this next code at the moment but you should be able to do what you want with something like this….
add_filter( 'nsur_settings', array( $this, 'allow_public_to_register_by_default' ), 10, 1 );
function allow_public_to_register_by_default( $settings ) {
// Override the settings default to allow public to register by default.
$settings['nsur_general']['settings'][0]['std'] = TRUE;
}
let me know how you get on.
@nminchow
How did you get on ?
I’ll mark this as resolved unless you come back with anything.
@justinticktock
I tried this, but wasn’t having any luck. I traced the code and I feel like we were on the right track, but I didn’t spend much time debugging.
@nminchow
Did you trial creating a new site to check its initial setup?
The default will only apply for a new site creation, once it exists whatever you set within the settings page will overwrite it.
@justinticktock
Yup I was checking with new sites.