Table – what is the recommended way to delete users

Features can be written in plugins that store a list of user IDs in their own fields in the database. WordPress doesn’t find these associations when you delete a user, so code using those lists can fail catastrophically.

Databases in WordPress include a “delete” column and a “user_status” column.

In the WP_User notes on the WordPress site wp_user constructor it refers to the ‘delete’ column as a WordPress multisite field as if it is the current one. But setting this value to 1 in the database does not prevent users from appearing in the users list.

So it seems that wordpress ignores this field.

Can we rely on the ‘deleted’ field to remain in the WordPress wp_users table so that we can filter the list of users ourselves or may the ‘deleted’ field disappear in a future WordPress update?

either

Is there a ‘recommended’ method of deleting users so that they are no longer displayed in the users list table?

Leave a Comment