WordPress.org

Support

Support » Plugins and Hacks » update_user_meta not working

update_user_meta not working

  • vilhjalmurv
    Member

    @vilhjalmurv

    Hi, I’m having a problem with update_user_meta. I am trying to add custom fields to user profiles, I get the fields to display in profile.php, but everytime I try to save the data using update_user_meta it wont save. For most of the users the meta key doesn’t exist, so update_user_meta should create it, but it doesn’t…

    Can anyone spot my mistake?

    http://pastebin.com/tBRt11fc

Viewing 4 replies - 1 through 4 (of 4 total)
  • NateJacobs
    Member

    @natejacobs

    I spotted two things. First, you are missing the call to global $nff_custom_fields; in your nffpc_save_custom_profile_field function so the variable is undefined. Second, on line 58 and 59 your callback functions have an ‘s’ on the end, but your function name on line 44 does not.

    vilhjalmurv
    Member

    @vilhjalmurv

    Thanks, I tryed that, but not working so far 🙁

    vilhjalmurv
    Member

    @vilhjalmurv

    Got it to work with your help, just forgot that i changed update_user_meta to update_user_option when I was troubleshooting.

    NateJacobs
    Member

    @natejacobs

    Awesome. Glad to hear.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘update_user_meta not working’ is closed to new replies.