Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Recreate a Deleted Account With Same Username #4614

Closed
ghost opened this issue Aug 16, 2017 · 19 comments
Closed

Can't Recreate a Deleted Account With Same Username #4614

ghost opened this issue Aug 16, 2017 · 19 comments

Comments

@ghost
Copy link

ghost commented Aug 16, 2017

I created an account on mastodon.social (davidpgil). I cancelled the account, but later decided I want to activate the account again as the same username. I get an error message saying the username is taken already.

@Cassolotl
Copy link

Cassolotl commented Aug 16, 2017

Because instances are entirely separate, say George on cybre.space is following Simone on mastodon.social - if Simone deletes her mastodon.social account, George on cybre.space doesn't stop following Simone.

So if someone were to come along and create a new account using Simone's deleted username, George would suddenly be following some randomer with Simone's username and be like, "eh? This is weird."

So I think that's why usernames of deleted accounts can't be reused. If someone with like 600 followers deleted their account, someone else could come and make an account with that deleted username, pretend to be that person, and have 600 followers straight away - who could potentially think that old-user and new-user are the same person.

Whether there is a solution to this, I do not know. But that's my understanding of the situation, which might be limited, and maybe someone else who knows more than me can come and explain things more.

Edit: If it's clear that you're the owner of the deleted account (same email address?) you could email the admin and ask them to un-delete it somehow maybe?

@Lana-chan
Copy link

No point in asking an admin to un-delete it. We don't know how to do that either. Deleting a mastodon account effectively breaks it in the DB and any admin actions throw error pages if you try them on a deleted account.

@Cassolotl
Copy link

Cassolotl commented Sep 10, 2017

A new issue has been opened for something at least like this one, #4874. I was going to say it was a duplicate and redirect people here, but the post is quite in-depth and has some ideas and suggestions in it. I don't really know what to do so I thought I'd at least leave a connection between the two issues. Oops, unrelated!

@nightpool
Copy link
Member

This is intentional. Deleting accounts is a permanent action, and there's no way to undo it. you are warned about that before confirming your deletion. Furthermore, the username is kept in a reserved state to prevent future impersonations. This is also something that the site warns you about.

If people think our messaging could be clearer in that area, i'd be happy to brainstorm suggestions.

@Lana-chan "unsuspending" an account is trivial for an admin. just click the "unsuspend" button in the admin panel for that account.

@nightpool
Copy link
Member

@Cassolotl that's a completely different issue, it has to do with instances that have wiped their DB.

@Lana-chan
Copy link

i didn't say unsuspending, i said undeleting

you still can't recreate a deleted account unless you fuck up your db like i did, see https://computerfairi.es/@squirrel/133700

please read what you're replying to before you reply

@Lana-chan
Copy link

the words on my first comment are deleted account. not once i said the word suspended.

@nightpool
Copy link
Member

@Lana-chan deleting accounts is just suspending them though?

@nightpool
Copy link
Member

@Lana-chan if you're having an issue unsuspending users that have deleted their accounts, that sounds like a different issue. I just tried it twice and it worked fine on my server.

@Lana-chan
Copy link

tried it several times with two deleted accounts in 1.4.7 and all admin controls on them returned errors. solution was to completely delete the accounts from rails console so i could reregister @Squirrel, which largely breaks federation

Mastodon is not ready for undeleting accounts and this needs to be fixed, some people want to reclaim their own old handles like i did

@Lana-chan
Copy link

actually, disregard that, the incident with one of the accounts was after upgrading to 1.5.1 so one of them was deleted and attempted restored entirely on that version and it still didn't work

deleting an account breaks it for the admin controls

@Lana-chan
Copy link

issue #4874 also talks about the same thing the first reply to this thread is saying. it is the exact same issue. not a different issue.

@Cassolotl
Copy link

I came here to delete my comment because someone said it was a different issue but it seems there is disagreement, so I will leave it for clarify for future readers.

@fsnk
Copy link

fsnk commented Nov 29, 2017

I did some experimenting with this - from the admin interface a deleted (by the user) account is shown as "suspended".

I'm not sure what other changes are made besides deleting all the data. Unsuspending it from the interface seems to work, but there's no way for either the user or admin to enter an email address, which means the username is inaccessible because the username has no associated login and the user can't request a password reset.

I assume if you manually add the email address directly into the database, you might be able to restore access to the username, but I haven't tested it because I don't have a non-production installation available where I can monkey up the database.

If that's so, maybe it would just be possible to add the ability for the admin to edit the email address associated with an account. (Also useful if users lose access to an email address or their address is changed some other way.)

@rixx
Copy link

rixx commented Nov 8, 2022

Just for future people stumbling upon this issue: At this point, you can recrete a deleted user as adminstrator with tootctl:

tootctl accounts create USERNAME --reattach --force --email EMAIL

@eWalthert
Copy link

Thanks a lot @rixx, we successfully rebuilt a user who deleted his account because of wrong capitalisation.
Is there also a way to change an account from @firsnamelastname into @FirstnameLastname via the tootctl?

@AxelTerizaki
Copy link

To do that, make sure you deleted the account using tootctl and get into the database. Usernames are still in the accounts table, and you should find the one you want to modify with a null domain (don't confuse it with another user on another domain).

I just did that for one of my users who wrongly registered with lowercase characters and got it modified using an UPDATE SQL command on that particular account in the accounts table.

Then recreate it using tootctl with the --reattach flag and it should be fine.

With everything DB-related, remember to make backups.

@eWalthert
Copy link

Thanks a lot @AxelTerizaki
That sounds complicated and I assume, it will kill the accounts so far activities.
@FirstnameLastname has been tooting and following people the last 10 days.
I’ll ask if this is still worth the trouble.

@AxelTerizaki
Copy link

You can probably just update the database entry without deleting it first but I have no idea if it would cause issues or not with other things in the database, we'd need a dev to answer that for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants