You can diagnose error while updating user email.
$user_data = wp_update_user( array( 'ID' => $user_id, 'user_email' => $email ) );
if ( is_wp_error( $user_data ) ) {
// There was an error; possibly this user doesn't exist.
echo 'Error.';
} else {
// Success!
echo 'User profile updated.';
}
Might it can help you.
Related Posts:
- get_user_meta() doesn’t include user email?
- Drop down list in user profile page
- Add custom fields to the user profile
- What is correct way to change user’s email?
- How can i add user display name drop down menu in frontend?
- Require confirmation of current user’s email before updating database and before send_email_change_email
- Validate user meta and redirect
- user_login vs. user_nicename
- Difference between update_user_meta and update_user_option
- Make display name unique
- Confirmation required on email change
- How do you update user_email on the front end in WP 3.3?
- Automatically delete inactive users after 2 months
- Email user when password is reset by admin
- How to set up User email verification after Signup?
- Where the Nickname is being used in WordPress
- How to display custom user meta from registration in backend?
- Allowing an email as the username?
- Grouping users under parent user
- How can I get users email (and additional data) from the rest API?
- How to create a template for a custom URI associated with the user
- How to order users alphabetically by their last name?
- How to create a public profile for authors/contributors/users?
- Extending WP_User class and using this sub-class during the whole lifecycle
- Wp_User_Query not sorting by meta key
- How we can get the user id by its display_name
- Send activation email to user after signup [duplicate]
- WP_User_Query with combined meta query – not working?
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- Show Biographical Info while creating new user
- Force users to complete their profile after they register? How to
- Upload gravatar in WP profile?
- include user profiles in search results?
- How to add follow functionality to multi-author wordpress site?
- Search multiple meta keys at once
- Where to Store Custom User Fields
- Plugin that would allow WordPress Authors to “follow” other Authors and query “Activity Info” from that
- Querying Email Addresses for a List of Users with Same Last Name?
- User profile custom field
- Front end user meta options for users
- ACF Upload Image in front-end with custom form
- add ‘file upload’ field to user details
- Extra User Profile Field Upload File / Image
- Completely hide user info
- Hide a user from WordPress
- Check for user meta data at Login
- Searchable meta value in user.php
- How to add country drop down menu to the user profile?
- Buddypress – Send New User Activation Link to Admin [closed]
- Delete user from frontend
- Custom style on profile options page
- Cannot set user passwords
- Memory usage for scalable usermeta queries
- Send Email to Users after Deleting Account
- Is there any function available to echo current user’s profile url?
- stop login if user_status equal zero
- How to add local users to wordpress without email password?
- Does wp_delete_user() remove all user content?
- WP User Query fails when searching meta queries and search columns
- Log all users out of all locations after 24 hours
- How can i create an array user meta?
- Disable user profile editing for one user
- Adding second Email address for WP user notifications
- Add email addresses to already registered users
- How can I check if a user’s email exists in the database
- Suddenly all emails in User have [email protected]
- How to set show admin bar front to true for all users?
- Add user data to table when user is created?
- User Last Login Sort Column
- Updating user meta
- how to make a profile entry read only except for site managers [closed]
- Forcing WordPress to work differently
- WordPress User Profile Upload – If page is saved file reset
- WordPress User Meta & ChromePHP or other way to debug/view php variables
- Use wp_update_user to update custom column in wp_users table
- Remove user profile field [duplicate]
- Are User Levels Still Currently Used?
- How to add a user profile page to frontend?
- Send mail to user only once when specific check box is selected and updated from profile meta updated by admin
- WPML Default Language User Meta [closed]
- Display users in order by an “order” custom meta field
- Is there a way to make custom fields only editable by administrators?
- Search Users base on meta_value & meta_key
- mysql query two database tables, users and usermeta and sort by custom meta int value
- Rest API code to get ID of current user not working: get_current_user_id() gives 0
- Translate emails into the language of the user
- Updating wp_user_level on user update
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- User Meta Data in a Sortable Table
- get_user_meta an ID for multiple functions
- Editable registration date field in user profile
- How can I attach a user to another user with user meta
- Column Sorting Code on users.php
- Profile page for user roles
- Creating user without username and password
- User profile updates password even if not filled (Theme my login) in Firefox? [closed]
- List users by meta_key and meta_value
- Is this code true or not