'render_tab1', 'tab2' => 'render_tab2', 'tab3' => 'render_tab3', ); function __construct() { $this->render_menu_page(); } function set_menu_tabs() { $this->menu_tabs = array( 'tab1' => __('Manual Approval', 'all-in-one-wp-security-and-firewall'), 'tab2' => __('Registration Captcha', 'all-in-one-wp-security-and-firewall'), 'tab3' => __('Registration Honeypot', 'all-in-one-wp-security-and-firewall'), ); } function get_current_tab() { $tab_keys = array_keys($this->menu_tabs); $tab = isset( $_GET['tab'] ) ? sanitize_text_field($_GET['tab']) : $tab_keys[0]; return $tab; } /* * Renders our tabs of this menu as nav items */ function render_menu_tabs() { $current_tab = $this->get_current_tab(); echo ''; } /* * The menu rendering goes here */ function render_menu_page() { echo '
'; echo '

'.__('User Registration','all-in-one-wp-security-and-firewall').'

';//Interface title $this->set_menu_tabs(); $tab = $this->get_current_tab(); $this->render_menu_tabs(); ?>
menu_tabs); call_user_func(array(&$this, $this->menu_tabs_handler[$tab])); ?>
debug_logger->log_debug("Nonce check failed on save user registration settings!",4); die("Nonce check failed on save user registration settings!"); } //Save settings $aio_wp_security->configs->set_value('aiowps_enable_manual_registration_approval',isset($_POST["aiowps_enable_manual_registration_approval"])?'1':''); //Commit the config settings $aio_wp_security->configs->save_config(); //Recalculate points after the feature status/options have been altered $aiowps_feature_mgr->check_feature_status_and_recalculate_points(); $this->show_msg_updated(__('Settings were successfully saved', 'all-in-one-wp-security-and-firewall')); } if(isset($_REQUEST['action'])) //Do list table form row action tasks { if($_REQUEST['action'] == 'approve_acct'){ //Approve link was clicked for a row in list table $user_list->approve_selected_accounts(strip_tags($_REQUEST['user_id'])); } if($_REQUEST['action'] == 'delete_acct'){ //Delete link was clicked for a row in list table $user_list->delete_selected_accounts(strip_tags($_REQUEST['user_id'])); } if($_REQUEST['action'] == 'block_ip'){ //Block IP link was clicked for a row in list table $user_list->block_selected_ips(strip_tags($_REQUEST['ip_address'])); } } ?>

'.__('If your site allows people to create their own accounts via the WordPress registration form, then you can minimize SPAM or bogus registrations by manually approving each registration.', 'all-in-one-wp-security-and-firewall'). '
'.__('This feature will automatically set a newly registered account to "pending" until the administrator activates it. Therefore undesirable registrants will be unable to log in without your express approval.', 'all-in-one-wp-security-and-firewall'). '
'.__('You can view all accounts which have been newly registered via the handy table below and you can also perform bulk activation/deactivation/deletion tasks on each account.', 'all-in-one-wp-security-and-firewall').'

'; ?>
output_feature_details_badge("manually-approve-registrations"); if (AIOWPSecurity_Utility::is_multisite_install() && get_current_blog_id() != 1) { //Hide config settings if MS and not main site AIOWPSecurity_Utility::display_multisite_message(); } else { ?>
: configs->get_value('aiowps_enable_manual_registration_approval')=='1') echo ' checked="checked"'; ?> value="1"/>

prepare_items(); ?>
display(); ?>
debug_logger->log_debug("Nonce check failed on registration captcha settings save!",4); die("Nonce check failed on registration captcha settings save!"); } //Save all the form values to the options $random_20_digit_string = AIOWPSecurity_Utility::generate_alpha_numeric_random_string(20); //Generate random 20 char string for use during captcha encode/decode $aio_wp_security->configs->set_value('aiowps_captcha_secret_key', $random_20_digit_string); $aio_wp_security->configs->set_value('aiowps_enable_registration_page_captcha',isset($_POST["aiowps_enable_registration_page_captcha"])?'1':''); $aio_wp_security->configs->save_config(); //Recalculate points after the feature status/options have been altered $aiowps_feature_mgr->check_feature_status_and_recalculate_points(); $this->show_msg_settings_updated(); } ?>
'.__('This feature allows you to add a captcha form on the WordPress registration page.', 'all-in-one-wp-security-and-firewall').'
'.__('Users who attempt to register will also need to enter the answer to a simple mathematical question - if they enter the wrong answer, the plugin will not allow them to register.', 'all-in-one-wp-security-and-firewall').'
'.__('Therefore, adding a captcha form on the registration page is another effective yet simple SPAM registration prevention technique.', 'all-in-one-wp-security-and-firewall').'

'; ?>

'; $special_msg .= '

'.__('The core default behaviour for WordPress Multi Site regarding user registration is that all users are registered via the main site.','all-in-one-wp-security-and-firewall').'

'; $special_msg .= '

'.__('Therefore, if you would like to add a captcha form to the registration page for a Multi Site, please go to "Registration Captcha" settings on the main site.','all-in-one-wp-security-and-firewall').'

'; $special_msg .= '
'; echo $special_msg; } else { //Display security info badge global $aiowps_feature_mgr; $aiowps_feature_mgr->output_feature_details_badge("user-registration-captcha"); ?>
: configs->get_value('aiowps_enable_registration_page_captcha')=='1') echo ' checked="checked"'; ?> value="1"/>
debug_logger->log_debug("Nonce check failed on registration honeypot settings save!",4); die("Nonce check failed on registration honeypot settings save!"); } //Save all the form values to the options $aio_wp_security->configs->set_value('aiowps_enable_registration_honeypot',isset($_POST["aiowps_enable_registration_honeypot"])?'1':''); $aio_wp_security->configs->save_config(); //Recalculate points after the feature status/options have been altered $aiowps_feature_mgr->check_feature_status_and_recalculate_points(); $this->show_msg_settings_updated(); } ?>
'.__('This feature allows you to add a special hidden "honeypot" field on the WordPress registration page. This will only be visible to robots and not humans.', 'all-in-one-wp-security-and-firewall').'
'.__('Since robots usually fill in every input field from a registration form, they will also submit a value for the special hidden honeypot field.', 'all-in-one-wp-security-and-firewall').'
'.__('The way honeypots work is that a hidden field is placed somewhere inside a form which only robots will submit. If that field contains a value when the form is submitted then a robot has most likely submitted the form and it is consequently dealt with.', 'all-in-one-wp-security-and-firewall').'
'.__('Therefore, if the plugin detects that this field has a value when the registration form is submitted, then the robot which is attempting to register on your site will be redirected to its localhost address - http://127.0.0.1.', 'all-in-one-wp-security-and-firewall').'

'; ?>

output_feature_details_badge("registration-honeypot"); ?>
: configs->get_value('aiowps_enable_registration_honeypot')=='1') echo ' checked="checked"'; ?> value="1"/>