• Resolved Jorgu5

    (@internetoholik)


    Hey,

    I’m trying to retrieve data user after register, generally, first name, last name and email. Using this function

    add_action(‘user_registration_after_register_user_action’, ‘ur_get_form_fields’, 10, 3);
    function ur_get_form_fields($form_data, $form_id, $user_id)
    {
    var_dump($form_data);
    }

    But when i’m trying to use $form_data, id or user_id variable it gives me an error “Unexpected token A in JSON at position 0”

    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Jorgu5

    (@internetoholik)

    Additional Notes:

    1. It is showing the same error message with all plugins deactivated and default WP Theme Twenty Nineteen activated.
    2. Plugin is at the latest version version 1.8.8
    3. Form has 4 fields, first name, last name, email and password.

    • This reply was modified 4 years, 4 months ago by Jorgu5.
    • This reply was modified 4 years, 4 months ago by Jorgu5.
    Thread Starter Jorgu5

    (@internetoholik)

    How can I get a quicker support on that ?

    Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @internetoholik,

    We are really sorry for the delayed response. In order to retrieve data after registration, please use a debug mode and copy and paste the given code and it will do a trick.

    Here is the code:

    add_action( 'user_registration_after_register_user_action', 'ur_get_form_fields', 10, 3 );
    function ur_get_form_fields( $form_data, $form_id, $user_id ) {
    	error_log( print_r( $form_data, true ) );
    }

    Let me know whether it helps or not and I will get back to you.

    Thanks and Regards!

    Thread Starter Jorgu5

    (@internetoholik)

    Hey,

    Still does not worki,

    I’m getting

    Unexpected token A in JSON at position 0

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Retrieve Data After Register’ is closed to new replies.