Deleting all User Signatures



  • Using NodeBB or Mongo's CLI, what would be the best way to delete all user signatures?


  • Admin

    After backing up your database you can run the following.

    db.objects.update({_key: {$regex: /^user:\d+$/}}, {$set: {"signature": ''}}); This will match all user documents and set the signature field to empty string.



  • @baris Thank you. I'm pretty new to Mongo and after a little tinkering I figured out I had to run the following to get it work correctly:

    db.objects.update({_key: {$regex: /^user:\d+$/}}, {$set: {"signature": ""}}, {multi: true});


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.