kompass_get_minimal_password_strength(), 'password_too_short_text' => 'Dass Passwort entspricht nicht den Anforderungen.' ]); } add_action( 'after_setup_theme', 'kompass_after_setup_theme' ); add_action( 'admin_menu', ['Bdp\Modules\KompassSettings\Controllers\SettingsPage', 'add_menu'] ); function crp_custom_register_form() { } add_action('register_form', ['Bdp\Modules\Registration\Controllers\ExtendRegistrationForm', 'execute']); // Validate registration form fields add_filter('registration_errors', ['Bdp\Modules\Registration\Controllers\ExtendRegistrationForm', 'error_messages'], 10, 3); // Save custom user meta data add_action('user_register', ['\Bdp\Modules\Registration\Controllers\SaveRegistration', 'execute']); // Handle account activation add_action('init', ['Bdp\Modules\Registration\Controllers\SaveRegistration', 'activate_user']); // Prevent login if account is not activated add_filter('authenticate', ['Bdp\Modules\Registration\Controllers\SaveRegistration', 'check_user_activation'], 30, 3); function crp_allow_umlauts_in_usernames($username, $raw_username, $strict) { if (!$strict) { return $username; } // Allow letters, numbers, underscores, spaces, periods, hyphens, and umlauts $username = preg_replace('/[^a-zA-Z0-9 _.\-äöüÄÖÜß]/', '', $raw_username); return $username; } add_filter('sanitize_user', 'crp_allow_umlauts_in_usernames', 10, 3); add_action('login_message', ['Bdp\Modules\Registration\Controllers\SaveRegistration','display_custom_message']); if (false === (bool)get_option('user_can_register', false)) { add_filter('registration_errors', 'kompass_disable_user_registration', 10, 3); function kompass_disable_user_registration($errors, $sanitized_user_login, $user_email) { $errors->add('registration_disabled', __('Die Registrierung ist derzeit deaktiviert.')); return $errors; } add_action('login_enqueue_scripts', 'kompass_remove_register_link'); function kompass_remove_register_link() { ?>