Skip to main content
deleted 4 characters in body
Source Link
Johannes Pille
  • 11.1k
  • 3
  • 42
  • 53

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further isit accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These

These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Line 1426 and after (as of 3.5.1) of /wp-includes/user.php

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Line 1426 and after (as of 3.5.1) of /wp-includes/user.php

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further it accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.

These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Line 1426 and after (as of 3.5.1) of /wp-includes/user.php

added 223 characters in body
Source Link
Johannes Pille
  • 11.1k
  • 3
  • 42
  • 53

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_userwp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_userwp_update_user and if a value exists added to the *_usermeta table via update_user_metaupdate_user_meta.

For reference, see LinesLine 1426 and after (as of 3.5.1) of /wp-includes/user.php

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Lines 1426 and after (as of 3.5.1) of /wp-includes/user.php

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Line 1426 and after (as of 3.5.1) of /wp-includes/user.php

added 753 characters in body
Source Link
Johannes Pille
  • 11.1k
  • 3
  • 42
  • 53

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_userwp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, jabberID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, aimthose are jabber, yimaim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, show_admin_bar_frontthat is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Lines 1426 and after (as of 3.5.1) of /wp-includes/user.php

wp_update_user updates records in the *_users table. It isn't meant to update metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, jabber, aim, yim, show_admin_bar_front

Any additional metadata should be saved as such with the appropriate functions.

wp_update_user & metadata

wp_update_user updates records in the *_users table. It isn't meant to update custom metadata in the *_usermeta table.

Hence your "problem" is actually expected behavior.

The $userdata argument passed to wp_update_user can contain the following fields:

ID, user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, user_registered, role, show_admin_bar_front

Further is accepts metadata that is recognized as a "contact method". This it will save to the *_usermeta table.

By default, those are jabber, aim & yim.
These can however be altered / appended to by means of the 'user_contactmethods' filter. As for the question raised in the comments, that is likely how twitter & facebook metadata have been made saveable via wp_update_user.

Any additional metadata should be saved as such with the appropriate functions.

How does it happen in the core?

This just as an aside:

wp_update_user calls _get_additional_user_keys which in turn calls _wp_get_user_contactmethods. The resulting metakeys are iterated over back in wp_update_user and if a value exists added to the *_usermeta table via update_user_meta.

For reference, see Lines 1426 and after (as of 3.5.1) of /wp-includes/user.php

Source Link
Johannes Pille
  • 11.1k
  • 3
  • 42
  • 53
Loading