Can I undelete a custom user field?

Currently, deleting a custom field (tables user_fields and user_fields_options if its field_type is dropdown) doesn’t delete the actual values for the users (table user_custom_fields), so a quick (but potentially dangerous: backup first) workaround is to:

  1. Manually create a new custom field
  2. Replace the new id user_fields with the old one (this requires admin access to the database): UPDATE user_fields SET id=1 WHERE id=3; (assuming 3 is the new id and 1 is the old one)
  3. If the field was a dropdown, you’d have to do a similar thing in user_field_options
  4. If any users signed up for your site and filled out the new field before you fixed it (or if any existing user filled out the new field), you’d also have to fix those.