Multisite Login Security feature request – option to apply Login Security settings to all subsites

Home Forums BulletProof Security Free Multisite Login Security feature request – option to apply Login Security settings to all subsites

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23258
    TSS
    Participant

    Hi AIT,

    I currently have the BPS Plugin network activated on my multisite. I noticed that clicking “Save Options” on the Main site’s Login Security Menu does not seem to apply to the rest of the sub-sites. This would mean that I will have to click “Save Options” on each sub-site’s Login Security Menu for the Login Security to be “activated” on each sub-site. Would it be possible for the network admin to control the settings of all the sub-sites from the main site instead?

    Thank you.

    #23262
    AITpro Admin
    Keymaster

    I think adding an additional option to apply all Login Security settings to all subsites is an excellent idea.  This new option would be added to the Setup Wizard Options.  A Network Admin BPS plugin menu has not been added intentionally since some settings should only be done from the Primary site.  BPS .52 is in Dev lockdown so we will add this new Login Security option in BPS .52.1.

     

    #23339
    TSS
    Participant

    Hi AitPro Admin,

    Thanks for getting back on this so quickly. Is there an ETA for the said release of version BPS .52.1 ? Also I noticed 1 more thing, the “Show Login Attempts Remaining” does not seem to be displaying the login attempts correctly. Noticed that it is oscillating between 1 and 0 so is there a specific reason for this? Do let me know, Thank you.

    #23340
    AITpro Admin
    Keymaster

    Ballpark guess for the .52.1 release is probably somewhere around 20 days from now.  Do you have any other login or login security plugins installed or a membership theme or plugin or anything else installed that handles login processing?

    #23343
    TSS
    Participant

    Hi AitPro Admin,

    Thank you for the ETA release. I do have password another login security plugin but it is already deactivated. Are there any other plugins that BPS might be incompatible with?

    #23344
    AITpro Admin
    Keymaster

    Well it’s not a compatibility issue when it comes to WordPress Authentication.  WordPress has lots of hooks – actions and filters – that can be shared by many different plugins and themes at the same time.  Authentication is a completely different animal.  Only 1 plugin or theme can use a WordPress Authentication hook at a time.  An analogy would be 2 or more people trying to drive a car at the same time.  Not gonna work.

    #23347
    TSS
    Participant

    Hi AitPro Admin,
    Thanks for the clarification. Will be waiting for the release of version .52.1.

    #24199
    AITpro Admin
    Keymaster

    @ TSS – The Setup Wizard Network|Multisite Sitewide Login Security option setting did not make the cut off for inclusion in BPS .52.1.  The code is below if you would like to add it now to your BPS .52.1 version.  This code will be included in BPS .52.2.

    Open the BPS Setup Wizard file: /bulletproof-security/admin/wizard/wizard.php and edit it at code line: 1593
    directly after the SetupWizardGDMW form code add the bpsNetLSM form code and the form processing code shown below.

    <form name="SetupWizardGDMW" action="options.php#bps-tabs-2" method="post">
    <?php settings_fields('bulletproof_security_options_GDMW'); ?>
    <?php $GDMWoptions = get_option('bulletproof_security_options_GDMW'); ?>
    
    <label for="wizard-curl"><?php _e('Go Daddy Managed WordPress Hosting (GDMW):', 'bulletproof-security'); ?></label><br />
    <select name="bulletproof_security_options_GDMW[bps_gdmw_hosting]" style="width:300px;">
    <option value="no" <?php selected('no', $GDMWoptions['bps_gdmw_hosting']); ?>><?php _e('No (default setting)', 'bulletproof-security'); ?></option>
    <option value="yes" <?php selected('yes', $GDMWoptions['bps_gdmw_hosting']); ?>><?php _e('Yes (ONLY if you have Managed WordPress Hosting)', 'bulletproof-security'); ?></option>
    </select><br />
    <input type="submit" name="Submit-Wizard-GDMW" class="button bps-button" style="margin:10px 0px 20px 0px;" value="<?php esc_attr_e('Save GDMW Option', 'bulletproof-security') ?>" />
    </form>
    
    <form name="bpsNetLSM" action="admin.php?page=bulletproof-security/admin/wizard/wizard.php#bps-tabs-2" method="post">
    <?php wp_nonce_field('bulletproof_security_net_lsm'); ?>
    <div>
    <strong><label for="NetLSM"><?php _e('Network|Multisite Sitewide Login Security Settings', 'bulletproof-security'); ?></label></strong><br />
    <input type="submit" name="Submit-Net-LSM" class="button bps-button" style="margin:10px 0px 20px 0px;" value="<?php esc_attr_e('Save Network LSM Options Sitewide', 'bulletproof-security') ?>" />
    </div>
    </form>
    
    <?php
    // Network|Multisite: update/save Login Security DB option settings for all sites
    if ( isset( $_POST['Submit-Net-LSM'] ) && current_user_can('manage_options') ) {
    		check_admin_referer( 'bulletproof_security_net_lsm' );
    
    	if ( is_multisite() ) {
    	
    		if ( wp_is_large_network() ) {
    			echo '<div id="message" class="updated" style="border:1px solid #999999;margin-left:220px;background-color:#ffffe0;"><p>';
    			$text = '<font color="red"><strong>'.__('Error: Your Network site exceeds the default WP criteria for a large network site. Either you have more than 10,000 users or more than 10,000 sites. Please send an email to info@ait-pro.com for help. Use this email Subject line: Setup Wizard Options Large Network Site Help.', 'bulletproof-security').'</strong></font>';
    			echo $text;
    			echo '</p></div>';
    		return;
    		}
    
    		$successMessage = __(' LSM DB Options created or updated Successfully!', 'bulletproof-security');
    		$successTextBegin = '<font color="green"><strong>';
    		$successTextEnd = '</strong></font><br>';
    
    		$network_ids = wp_get_sites();
    
    		foreach ( $network_ids as $key => $value ) {
    			
    			$net_id = $value['blog_id'];
    		
    			$bps_Net_lsm = 'bulletproof_security_options_login_security';
    	
    			$BPS_Net_LSM_Options = array(
    			'bps_max_logins' 		=> '3', 
    			'bps_lockout_duration' 		=> '60', 
    			'bps_manual_lockout_duration' 	=> '60', 
    			'bps_max_db_rows_display' 	=> '', 
    			'bps_login_security_OnOff' 	=> 'On', 
    			'bps_login_security_logging' 	=> 'logLockouts', 
    			'bps_login_security_errors' 	=> 'wpErrors', 
    			'bps_login_security_remaining' 	=> 'On', 
    			'bps_login_security_pw_reset' 	=> 'enable',  
    			'bps_login_security_sort' 	=> 'ascending' 
    			);
    
    			if ( ! get_blog_option( $net_id, $bps_Net_lsm ) ) {	
    		
    				foreach( $BPS_Net_LSM_Options as $key => $value ) {
    					update_blog_option( $net_id, 'bulletproof_security_options_login_security', $BPS_Net_LSM_Options );
    				}
    	
    				echo $successTextBegin.'Site: '.$net_id.$successMessage.$successTextEnd;
    			
    			} else {
    
    				$BPS_LSM_Options_Net = get_blog_option( $net_id, 'bulletproof_security_options_login_security' );
    		
    				$BPS_Net_Options_lsm = array(
    				'bps_max_logins' 		=> $BPS_LSM_Options_Net['bps_max_logins'], 
    				'bps_lockout_duration' 		=> $BPS_LSM_Options_Net['bps_lockout_duration'], 
    				'bps_manual_lockout_duration' 	=> $BPS_LSM_Options_Net['bps_manual_lockout_duration'], 
    				'bps_max_db_rows_display' 	=> $BPS_LSM_Options_Net['bps_max_db_rows_display'], 
    				'bps_login_security_OnOff' 	=> $BPS_LSM_Options_Net['bps_login_security_OnOff'], 
    				'bps_login_security_logging' 	=> $BPS_LSM_Options_Net['bps_login_security_logging'], 
    				'bps_login_security_errors' 	=> $BPS_LSM_Options_Net['bps_login_security_errors'], 
    				'bps_login_security_remaining' 	=> $BPS_LSM_Options_Net['bps_login_security_remaining'], 
    				'bps_login_security_pw_reset' 	=> $BPS_LSM_Options_Net['bps_login_security_pw_reset'],  
    				'bps_login_security_sort' 	=> $BPS_LSM_Options_Net['bps_login_security_sort'] 
    				);
    
    				foreach( $BPS_Net_Options_lsm as $key => $value ) {
    					update_blog_option( $net_id, 'bulletproof_security_options_login_security', $BPS_Net_Options_lsm );
    				}
    			
    					echo $successTextBegin.'Site: '.$net_id.$successMessage.$successTextEnd;
    			}
    		}
    	}
    }
    ?>
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.