From d948bdff02ca334a8e51185f9e68b37531da25fc Mon Sep 17 00:00:00 2001 From: Alda Marteau-Hardi Date: Tue, 19 Sep 2017 16:35:36 +0200 Subject: [PATCH] Add instruction to undelete a user. (#374) * Add instruction to undelete a user. * Domain is null for local accounts. --- Running-Mastodon/Administration-guide.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Running-Mastodon/Administration-guide.md b/Running-Mastodon/Administration-guide.md index 6218b840..358715a9 100644 --- a/Running-Mastodon/Administration-guide.md +++ b/Running-Mastodon/Administration-guide.md @@ -67,6 +67,18 @@ When a whole instance is engaging in mass-scale hostile activity (spam, vandalis Additionally you can toggle the "reject media" option. When enabled, media files from the domain will not be downloaded to your servers. That includes users' avatars and headers as well as media attachments for toots. +## Reactivating a previously deleted user + + RAILS_ENV=production bundle exec rails c + account = Account.find_by(username: 'username', domain: null) + account.suspended = false + user = User.create!(email: 'email', password: 'password', account: account) + user.confirm + account.save! + user.save! + +This will create a new user associated with the old account_id. They'll not have any followings, followers nor toots but depending on how much time has passed since the deletion, they might still appear in their old federated followers timeline. Previous federated toots might not have been deleted too. + ## Activity monitoring Munin graphs can be generated to track your instance activity.