A
A
Alexander Sobolev2018-10-24 20:39:26
WordPress
Alexander Sobolev, 2018-10-24 20:39:26

What is better to use when updating a user profile?

I am writing custom user profile pages, got to update data, read about update_user_meta(), and wp_update_user( $userdata )
Q: Is wp_update_user( $userdata ) able to update custom profile fields like phone number, age etc?
I'm asking because I saw a facebook and other nonsense in the tweeter array - they are custom (like user_meta) or default in WP.
In general, which is better to use, or do you need both functions at once?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Klepko, 2018-10-24
@san_jorich

wp_update_user is not designed to work with the wp_user_meta table. Use update_user_meta()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question