• Resolved senseiussd

    (@senseiussd)


    I get the following error when my code runs wp_insert_user(). It does create a new user but fails to add some, but not all, of the meta data. I can activate and deactivate your plugin and the problem comes and goes with that.

    Warning: Cannot modify header information – headers already sent by (output started at /home/ussdstud/public_html/dragontournaments/wp-includes/class.wp-styles.php:297) in /home/ussdstud/public_html/dragontournaments/wp-includes/pluggable.php on line 928

    If you need to see this in action, let me know and I will put together a page to demo the problem. You will need login credentials.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Sherk

    (@jsherk)

    If you disable all other plugins and leave mine active, does the issue go away?

    Most likely this is being caused by a conflict with another plugin so we need to figure out which one.

    Let me know if you can troubleshoot that or not.

    Thread Starter senseiussd

    (@senseiussd)

    I disabled all plugins except this one and the problem does not go away. This is the code I am using.

    function create_competitor(){
    if (isset($_POST[‘ncheck’])){
    $userdata = array(
    ‘user_login’ => ‘bobbilly’,
    ‘user_url’ => ‘xxxxx’,
    ‘user_pass’ => NULL,
    ‘first_name’ => ‘bob’,
    ‘last_name’ => ‘billy’,
    );
    $user_id = wp_insert_user( $userdata ) ;
    }
    ?>
    <form method=”post”>
    <input type=”hidden” name=”ncheck”>
    <input type=”submit” name=”submitnew” value=”Save This Student” id=”submitnew”/>
    </form>
    <?
    }

    Plugin Author Jeff Sherk

    (@jsherk)

    If you remove this code, does my plugin function properly?

    Also, can you clarify… Is this your own custom plugin you are using? Or is this a custom function you have added to functions.php? It’s unclear to me where/how you are using this code.

    Plugin Author Jeff Sherk

    (@jsherk)

    No response from OP so marking as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error when adding new records to user database’ is closed to new replies.