Delete "About me" for all users

I’d like to delete the content of the “About me” field for all users. How could I do this?

(We are switching away from in integrated website that automatically managed this field with metadata, in favor of custom fields and allowing users to update their “About me” field from within Discourse.)

1 Like

I think it’s

UserProfile.all.update_all(bio_raw: nil, bio_cooked: nil)

You should test it first, perhaps on a single user like this:

UserProfile.where(user_id: 1).update_all(bio_raw: nil, bio_cooked: nil)
2 Likes