It depends on what exact action you are using, and what the purpose of that action is.
For the update actions, for example, there should always be hooks that are triggered before doing the change (so that you may change or prevent it), and hooks that are triggered after the change has been completed (so that you can react to changes).
In your “user” case, if you want to compare the existing vs the changed user, you want to hook into the user_profile_update_errors action. This action gives you an object that shows you what the intended changes are, and whether there’s already an existing user. In that case, you can retrieve the existing user through its ID and compare them both.
See: https://codex.wordpress.org/Plugin_API/Action_Reference/user_profile_update_errors
Related Posts:
- Restrict post edit/delete based on user ID and custom field
- Get updated post meta on save_post action?
- Job of meta_key meta_value fields in database tables
- Post IDs missing on delete_postmeta action hook
- Set default Custom Post Meta Value
- get_*_meta doesn’t always return an array
- Like & Dislike functionality using JavaScript
- wordpress is_front_page() issue
- Retrieve user_meta and copy to post_meta
- Array of user ids to list of user names
- get Insert id for meta field
- help to decipher wp metadata
- Check For get_post_meta on Author Archive Page
- show user based on user_meta
- How to call get_post()?
- Remove action of an external plugin after checking if custom post meta is set
- Get posts by meta value
- Execute action after post is saved with all related post_meta records (data)
- advanced custom fields update_field for field type: Taxonomy
- update_post_meta not saving when value is zero
- Meta compare with date (stored as string) not working
- get_post_meta returning empty string when data shows in the database
- publish_post action hook doesn’t give post_meta_data
- How to access the post meta of a post that has just been published?
- How to get all term meta for a taxonomy – getting term_meta for taxonomy
- Should I sanitize custom post meta if it is going to be escaped later?
- Front-end update_post_meta snippet displays white screen?
- Query between two meta values?
- List posts under meta_value heading
- loop through all meta keys with get_post_meta
- Get post from meta_key and meta_value
- update_post_meta() whenever custom post type is updated
- How To Get User Data in Callback Function for pre_user_nicename?
- How to get custom post type to display post meta on archive pages?
- How to use post_id with a Class?
- Saving html into postmeta without stripping tags – safe?
- How to show Published date and/or Modified date
- wp_update_user isn’t instantly?
- how to delete all users and posts based on ‘user_meta’?
- Set Checkbox as checked by default
- How to use update_post_meta inside wp_trash_post
- “update_post_meta” not working in “wp_insert_post_data” hook
- Display All Custom Post Fields and Values, Unless Empty
- Restrict Access to Posts based on Custom User and Post Meta Data
- How to create a meta_query to get all posts with a specific meta data?
- Save an array of values in the post meta box
- hide posts with specific meta data from admin page
- Post MetaTable Overload
- get_post_meta() empty in preview WHEN custom post is published [closed]
- Custom RSS Feeds & Post Meta Data
- How to position user meta data field
- Read post meta values, only if posts are public
- get_permalink vs the_permalink
- Time & Date on Post – Time Ago Custom Function
- cannot get user_registered date from get_user_meta
- Updating my Post when expiry date is past
- Mass removing CSS from 1,700 post [closed]
- Hide post title input for all roles except admin
- Help with Post Meta
- How do I manage custom meta in post revisions in the Block Editor era?
- Generate metadata for cloud images
- Migrating meta value to new meta value
- Insert multiple metas in one time
- How to extract data from a post meta
- count post meta values
- Correct meta of Writing Meta Tags
- Get post_meta from specific post [closed]
- How to add tags to post from frontend?
- getting the post_id from the post_meta
- Post via wp-admin and via iOS app, same hooks and triggers involved?
- troubles with get_post_meta (and saving it)
- How to merge the array values in foreach?
- What format is this and how to get value “lal” and “pila” from it
- How to exclude posts by meta key value in the_post_navigation next prev links?
- How to save a meta_value as a numeric value after I retrieve it via update_post_meta?
- update_post_meta not working with transition_comment_status
- Update post meta date always store 1970-01-07
- Is it possible to pass an whole array using custom field in wordpress?
- Attachment metadata has value of ‘1’
- How do I update a specific value within array in a products metadata?
- Optimize WP Meta Query for large amount of post meta?
- rendering open graph meta tags in wordpress
- Restore deleted _thumbnail_id in postmeta table
- Hide the_meta if no value
- php wp_insert data on front using a form
- Updating post_meta when updating a setting with the Settings API
- How to show specific meta keys of all posts in admin panel?
- wp_schedule_event not working
- Media library orphans
- WordPress join posts with meta values of array type
- Cache metadata for set of posts
- How to make certain content of the post noindex and no follow. not entire post?
- Create action running on trashed_post hook to modify post_meta value
- Export posts with postmeta without ID?
- How can I display my meta value in a textarea? [closed]
- delete blank space in post_meta empty [closed]
- Auto save title as custom meta field value
- How to show wordpress post in the site based on custom field value?
- Extend file format support for post thumbnails
- Why isn’t my embed_video WYSIWYG field updating when using update_post_meta?