There are far better ways of doing this. Instead of modifying the user table, make use of User Meta. It has a dedicated table, and works the same way as post meta, but for users.
- add_user_meta
- get_user_meta
- update_user_meta
There are many tutorials explaining how to add additional fields to the user profile using User meta to store them, and it’s how a lot of standard data is stored already, such as the positions of boxes on the dashboard when you drag them around, how many posts to show at once in the edit screen, or which popups you’ve clicked dismiss on
Related Posts:
- Select Multiple meta_value from WP DB; Single Query
- In what part of the WordPress core does the users table and usermeta table get joined?
- Modify Database in Multi-Site wp_usermeta table
- How to Access wp_usermeta Data Immediately After a New User is Created
- Users table missing from Database [closed]
- Recovering the table wp_usermeta from users
- Storing user submitted forms [closed]
- wp_insert_user not creating account correctly when ID is manually set
- how add more field to wp user and save it to database
- Move Non-WordPress users table to WordPress database
- How to get the id of recently registered user from database?
- update multiple user meta field based on another meta field
- Multiple developers / editors working on a site in progress
- How many users can WordPress handle?
- How to track user progress?
- Performance tips for a large user base [closed]
- Efficiency on displaying random authors based on large database
- What’s the most efficient database method to add and query usermeta?
- How to use user table of a different database for WordPress users?
- Subscribers to posts
- Set Display Name to first and last name (phpmyadmin SQL Query)
- update_user_meta() does not work
- Is it possible to store visitors IPs in wp_postmeta table?
- Getting all the users who have author privilege
- Which is more efficient? Using usermeta, or creating a new MySQL table?
- Does WordPress always create unique passwords?
- User Last Login Sort Column
- A field with dashes in the slug [closed]
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- Check if column exists for one table in DB
- Change WordPress prefix for only one table?
- Best way to tell if a user account is active, using the database only
- Using GROUP CONCAT in my-sql query with wp_usermeta table
- wp_get_current_user always returns 0 continued
- Is it safe to delete unnecessary user metadata?
- How to replicate a user plugin made table value, to this user’s custom meta table value?
- Is there a smart way to obtain a list of only some selected user meta data?
- How can i customize the export personal data file?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- WordPress Database Huge wp_usermeta Table
- Import users from old WP site to new one
- Logins from WP users table use on another page
- MS Access to manage WordPress Database
- 2 WordPress sites with 2 databases but sharing the same users
- Convert user passwords to MD5?
- What can I do when an outside party hacks into my weblog and changes my display name?
- Does WordPress store the username as a primary key in the database?
- Is there a way to execute a php script outside WordPress?
- multiple wordpress installation with shared usertable on an different database
- Best practice to import user base (subscribers) from one website to another?
- Share users across multiple sites on same database, but with different domains
- Some weird users in database
- How to delete a particular row in a database table
- I cannot find the difference between these wp_capabilities values in wp_usermeta
- Regenerate user_nicename column
- Buddypress avatar image in database [closed]
- WordPress where clauses in db select
- Select From wpdb – Author/User Directory page
- Can’t log into wordpress site – I have made a new user and still cant access
- Need help with creating a searchable user data by name or specific number like ID
- Compare User meta_value with Product meta_value
- Best Practice? – Saving multiple Values as Serialized Data / Saving each Value per Row / Dedicated Table
- Migrate Users From laravel to wordpress
- Join Query on WP_USERMETA Table
- Display user data in numbered list
- User input to database
- generate PDF from member information
- Change user_nickname for author page link
- how restrict user to give star ratings once for a post?
- create a table using user meta custom data
- How to save dropdown slection by a user in the DB
- How to get specific table by current user login
- get_user_meta and umeta_id
- Hash user emails in database?
- Changed meta_key value in structures, now dashboard shows zero users
- What WordPress file is saving new users to database
- Get id from database
- Preventing concurrent update of data
- WordPress sync with phpbb
- Let users register weight each day and save it in DB
- import (migration) user database to wp-users
- Calling update_user_meta inside of another function doesn’t work
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- What is best for saving lot of extra detail of user?
- WP Multisite Users Not Linking
- wp_usermeta key problem
- Query a meta key using an array of values where the database value is a string
- Lost the `wp_options` table: what’s the best way to restore the site?
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- Hide a user from WordPress
- Is a direct or import approach safer for migration into WordPress?
- How do I convert a MySQL database from utf8mb4 to utf8 encoding?
- Why user_pass column in wp_users table is varchar(64)
- Using $wpdb | checking entered email against existing emails in db
- wp-cli: Error establishing a database connection: undefined constant DB_USER
- Outputting query results
- Search Character Set Problem
- How to fix Uploaded to this post option to see group of images uploaded to a post?
- Order of search results based off of a backend custom field and also in alpha order