• Resolved smanusspain

    (@smanusspain)


    I have created a custom plugin that (among other things) after a successful UM user registration needs to pass the form data to an API for a 3rd party CRM system (Revel). I have hooked to both um_user_register and um_registration_complete which different resulting problems.

    If I use:
    add_action(‘um_user_register’, ‘createNewUser’, 20, 2)
    my function never gets called.

    If I use:
    add_action(‘um_registration_complete’, ‘createNewUser’, 20, 2)
    my function is called and the data is passed correctly, but I get an “Invalid Nonce” error.

    Any ideas of what is going on?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter smanusspain

    (@smanusspain)

    By the way, I saw this topic addressed a couple of years ago and the following link was suggested:

    https://docs.ultimatemember.com/article/230-invalid-nonce-in-registration-form

    but the article has disappeared.

    Hi, did you find out the problem?

    I am trying to send data to 3rd party API after registration complete (um_registration_complete) but I don’t know why the function isn’t called.

    Thread Starter smanusspain

    (@smanusspain)

    Well, sort of. I have managed to get my function called using this hook:

    add_action(‘um_registration_complete’, ‘createNewUser’, 10, 2); //call from Ultimate Member for a new user

    (my function is ‘createNewUser’).

    As I mentioned above, I was getting an Invalid Nonce error which I was able to remove with this:

    add_filter( ‘um_register_allow_nonce_verification’, ‘turn_off_nonce’, 10, 1 ); // turn off nonce verification with UM – trying to solve crash

    function turn_off_nonce($allow_nonce) {
    $allow_nonce = false;
    return $allow_nonce;
    }

    I am still having a problem, however, with UM finishing the registration after the return from my function. It may be a conflict with another plugin or my theme. You may not have the problem. Let me know how it goes!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with registration hooks’ is closed to new replies.