Figured out the SQL query that can be used to reset the display_name to first_name + last_name. And it’s simpler than the JOINs that I was trying when I posted the question.
UPDATE wp_users
SET display_name = Concat(
(SELECT meta_value
FROM wp_usermeta
WHERE meta_key = 'first_name'
AND user_id = id
),
' ',
(SELECT meta_value
FROM wp_usermeta
WHERE
meta_key = 'last_name'
AND user_id = id
)
);
Related Posts:
- How can I prevent certain custom roles from seeing other custom roles on the user list page?
- List users by last name in WP_User_Query
- Wp_User_Query not sorting by meta key
- WP_User_Query with combined meta query – not working?
- pre_user_query meta_query admin user list
- Getting users who registered 360 days from current date
- Querying Email Addresses for a List of Users with Same Last Name?
- How to delete users with no order history through phpmyadmin sql?
- How to use search_columns in WP_User_Query?
- How to query users who have empty first_name?
- WordPress User getting added with id of 0
- WP User Query fails when searching meta queries and search columns
- WP User Query get all authors with last name starting with specific letter
- Getting users by specific capability, not role
- how to know when the user is in specific part of the website and when he leaves that part and display the data in the admin dashboard
- WP_User_Query – searching multiple fields
- Accessing current users data within a plugin
- How to activate the user search
- How change user type from contributor to author
- WordPress SQL Issue not returning correct reselts
- List Users alphabetically with heading
- is_user_logged_in() throwing undefined function error
- How to copy user_nicename value into user_login
- How to get the count
- SQL Bulk update all WordPress user’s nicknames to firstname + lastname format
- Display the line breaks in user bio without using html
- SELECT from wp_users, get Displayname too
- how to delete in phpmyadmin sql – all users with certain condition and all dependencies
- User with same Mail but a different additional info(like domain)
- How to get image path from id using SQL
- Cannot update newly added User field using wp_update_user
- Getting user data via ajax
- Find count of WordPress users by role and search string for user name
- Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
- Insert query not working for non-logged in user
- How to order posts by the user_login that corresponds to a meta_value (which is a user id)?
- Sort users by custom user meta value
- Show only users with the same role in Dashboard user list
- How do I display logged-in username IF logged-in?
- Difference between update_user_meta and update_user_option
- Make display name unique
- How to get WordPress Username in Array format
- Display user registration date
- How to set up User email verification after Signup?
- Allow up to 5 Concurrent Login Sessions
- Show admin bar only for some USERS roles
- How can I get users email (and additional data) from the rest API?
- How to hide “Filter user list” from “All Users” screen
- How to create a template for a custom URI associated with the user
- How to check user role without using current_user_can()
- How to assign capabilities to user NOT to User Role
- Setting WP Admin passwords to expire
- How to auto login user again after change user_login
- How do i auto approve new user?
- BuddyPress | Check if user is in current group [closed]
- Pre-populate Username Field
- Where to Store Custom User Fields
- Redirect after User Activation [closed]
- How to keep track of user logins?
- Mass delete spam accounts
- Get all commenters on a post
- WP_User->add_role producing unexpected results
- Adding tags and inputs to a user’s profile
- Changing default Buddypress avatar affects all site avatars (because gravatar)
- Custom style on profile options page
- Best way to have an per-user customized private section
- Post as someone else
- How to make user accept license agreement before download
- Does wp_delete_user() remove all user content?
- 14,000 WordPress Users. How did they get there?
- Adding second Email address for WP user notifications
- wp_login_form() passing user ID into URL on redirect?
- how to make a profile entry read only except for site managers [closed]
- Managing Users and Creating Groups [closed]
- Users: List A to Z, for Users
- Upgrade Nightmare – No Posts, Permissions Issues and Can’t Create a new post
- Max no of simultaneous active sessions for a single user
- WPML Default Language User Meta [closed]
- Search Users base on meta_value & meta_key
- Favorite taxonomy archive page?
- Removing all trace of member profiles
- WordPress API for search
- Fix permissions for users role
- Redirect subscribers to last viewed page after log-in
- User Meta Data in a Sortable Table
- Are there mutiple ways to get usernames (as a hacker)
- Rest api return all users (even without content) to all users
- Column Sorting Code on users.php
- How can I allow an User to publish only 5 posts per month?
- How to stop redirect if user is already on correct page (Using Case Switch)
- Passing args to WP_User_Query am I using meta correctly?
- search users using user name and user meta in wordpress
- Where are $current_user->allcaps set?
- Custom Comment Notifications Fire on each Page Load
- Append USER ID to an outbound link?
- How to destroy all user sessions via WP-CLI
- Is a list of user names or IDs in a custom profile field the best way to create a followers list?
- i need to let a user to add a role from a frontend form
- Why does a super admin on multi site get a rest_user_invalid_id error code when requesting user details through REST?
- Can Authors detach a syncd pattern?