Moved Hide Login to WPS Hide Login

Moved IP restrictions to Protect Login
This commit is contained in:
2024-10-31 12:35:46 +01:00
parent 4c95333c05
commit 3983108048
12 changed files with 22 additions and 788 deletions

View File

@ -1,26 +1,11 @@
<?php
if (!isset($loginHandler)) {
$loginHandler = new \Bdp\Modules\LimitLoginAttempts\Controllers\LoginHandler();
}
add_action('wp_login_failed', [$loginHandler, 'onFailedLogin']);
add_filter('wp_authenticate_user', [$loginHandler, 'onSuccessFullLogin'], 99999, 2);
add_filter( 'admin_enqueue_scripts', 'enqueue_custom_password_js',10 );
add_action('admin_init', 'kompass_admin_init');
if (get_option('kompass_cookies', false)) {
$loginHandler->handleCookies();
add_action('auth_cookie_bad_username', [$loginHandler, 'checkFailedCookies']);
add_action('auth_cookie_valid', [$loginHandler, 'onValidCookie'], 10, 2);
}
if (isset($_POST['save_kompass_balist_list_type'])) {
updateBlockOrAllowList($_POST);
}
function add_custom_admin_bar_item() {
return;
global $wp_admin_bar;
// Überprüfen, ob der Benutzer die erforderliche Berechtigung hat

View File

@ -1,9 +1,4 @@
<?php
use Bdp\Modules\EventParticipants\Controllers\MemberSummaryController;
use Bdp\Modules\EventParticipants\Controllers\PrintParticipantListPdfController;
use Bdp\Modules\EventParticipants\Controllers\RegisterMemberController;
use Bdp\Modules\LimitLoginAttempts\Controllers\LoginHandler;
use Bdp\Libs\DatabaseHandler;
@ -41,7 +36,6 @@ require_once (BDP_LV_PLUGIN_DIR . '/modules/security/security.php');
$dbHandler = new DatabaseHandler();
function kompass_admin_init()
{
kompass_settings_validators();
}
function bdp_kompass_load_plugin_textdomain() {
@ -80,7 +74,6 @@ function bdp_kompass_load_ajax_content() {
}
$loginHandler = new LoginHandler();
new BdpVersionChecker();
#add_filter( 'plugins_api', array( $class, 'info' ), 20, 3 );