WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how is profile information updated to DB? (8 posts)

  1. geoffe
    Member
    Posted 8 years ago #

    I've been looking through profile.php and profile-update.php trying to figure out how the form passes information to the DB, but I'm not figuring it out.

    What function(s) handles updating the DB? Where is it?

  2. Chris_K
    Member
    Posted 8 years ago #

    presumably (I've not delved into those two) they are using the informtion you provide in wp-config.php.

  3. geoffe
    Member
    Posted 8 years ago #

    profile.php makes a form that acts on profile-update.php, but I don't see where the data from the profile.php form is handled.

  4. Chris_K
    Member
    Posted 8 years ago #

    It includes admin.php.

  5. geoffe
    Member
    Posted 8 years ago #

    I don't see where in admin.php the data from the form in profile.php is handled.

    I've searched for update_usermeta and update_user_option to find where and how the data is processed, but nothing right comes up.

  6. Chris_K
    Member
    Posted 8 years ago #

    Sorry, I thought you were just asking how these things knew about the db.

    Ok. Look in profile.update.php: See
    errors = edit_user($user_ID); ?

    That's where the magic is happening. So, we ask ourselves, where is edit_user()? Well, we follow the "include" trail back to admin-functions.php (via admin.php) and, down around line 342 we find edit_user!

    But now I've lost track -- what are looking for?

  7. geoffe
    Member
    Posted 8 years ago #

    Eureka! you've found it.

    Thanks, I was skimming past that line seeing that it was doing error handling but completely missing that the errors were evaluated from the return of edit_user(). I figured somewhere there had to be many $_POST references.

    Took a few cracks at it, but you caught the little magic spell I was after.

  8. Chris_K
    Member
    Posted 8 years ago #

    I'm slow, but I usually get there. Eventually.

Topic Closed

This topic has been closed to new replies.

About this Topic