• Resolved Eli

    (@scheeeli)


    A client of mine uses the WP User Manager plugin for custom login / register pages on their site. I really like the Turnstile integration but it was incompatible with these custom login forms so I added this code to their site for it to work, and then thought I would send you the code so that you could be fully compatible with one more custom forms plugin.

    add_action('wpum_before_submit_button_login_form', 'cfturnstile_field_login');
    add_action('wpum_before_submit_button_password_recovery_form', 'cfturnstile_field_reset');
    add_action('wpum_before_submit_button_registration_form', 'cfturnstile_field_register');

    function ezcfts_before_registration_start() {
    if (function_exists('cfturnstile_check')) {
    // Check Turnstile
    $check = cfturnstile_check();
    $success = $check['success'];
    if($success != true)
    throw new Exception( 'Please verify that you are human.' );
    }
    }
    add_action('wpum_before_registration_start', 'ezcfts_before_registration_start');

    Obviously you might have a better way to tie in the cfturnstile_check process within your own plugin then by adding another function to do it but I found it was the best way to add this check without altering your plugin or the User Manager plugin. The login and password reset forms already performed the check on submitting the form (which was or course a real problem before I inserted the add_action calls for the turnstile field), but the registration page had neither the field nor the check in place before adding my code.

    I hope this helps and I look forward to seeing this code integrated into your next release so don’t have to continue to maintain and support this little additional add-on.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘NOT compatible with WP User Manager’ is closed to new replies.