WordPress.org

Ready to get started?Download WordPress

Forums

Profile Builder - front-end user registration, login and edit profile
[resolved] [Plugin: Profile Builder] Save the new fields in the registration process (5 posts)

  1. shaolin46
    Member
    Posted 3 years ago #

    Hi...my compliments for the plugin. I need to modify it, so I've added few code lines in the plugin-files to register more informations on the user profile.
    But I'm having a great problem :
    It can't save the extra information added in the registration process, while if a user after the registration goes to modify the profile and fill the same extra information and update the information are saved!

    I've seen in the wppb-front-end-register the call wp_insert_user( $userdata) and I've seen in the wordpress codex that the function wp_update_user( $userdata ) is the right function to add new profile informations, even if those doesn't exist before.

    So I've written :
    $user = wp_insert_user( $userdata );
    $update = wp_update_user( array ( 'ID' => $user, 'Information_1' => 'value', 'Information_2' => 'value' , [..etc..] ) );

    But it doesn't work! :(

    Any help?
    Thank you for the attention.

    Vince.

    http://wordpress.org/extend/plugins/profile-builder/

  2. shaolin46
    Member
    Posted 3 years ago #

    ..so I reply to myself after trying different things....
    The answer is to use the update_user_meta() function...

    Simply after the
    $new_user = wp_insert_user(...);

    I've added
    update_user_meta( $new_user, 'field_1' , 'value_1' );
    update_user_meta( $new_user, 'field_2' , 'value_2' );

    etc....
    an It works!

    Hope this can help someone :)

  3. barinagabriel
    Member
    Plugin Author

    Posted 3 years ago #

    Hello shaolin46,
    sorry for the late reply, but I am happy to hear you managed to figure it out by yourself.
    The new profile builder pro beta version is out, so if you would like to check it out, simply go here and follow the instructions :P

  4. shaolin46
    Member
    Posted 3 years ago #

    Hi barinagabriel,
    I've just submitted my email to test the pro beta version :)

    Thank you for the replay, and again my compliments for the plugin!!

    Vince.

  5. chandsir
    Member
    Posted 2 years ago #

    Thank you so much shaolin46 i have been searching for this the whole day,
    thanks for saving my day.....

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic