# Elimina il mio account con la console

**URL:** https://meta.discourse.org/t/delete-my-account-with-the-console/82450
**Category:** Support
**Created:** [7 Marzo 2018, 9:04pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450 "2018-03-07T21:04:32Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [7 Marzo 2018, 9:04pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/1 "2018-03-07T21:04:32Z")

</div>

Hi!

I have a weird issue with a Discourse forum, and I didn’t fine a solution by myself: I installed a forum, I have access to the console but I don’t run it. I asked to the current admin to delete my account because I don’t want to be involve in this mess, but he refuses.

Usually I would be fine letting my account in a forum without using it, but the admin like to Impersonate every account (like mine, or discobot) to post weird stuff, and I really don’t like it. I tried to talk some sense with this person but I don’t trust him at all.

I would prefer to delete my account permanently. I didn’t find a way via Discourse with an admin account, or even a developper’s account (with the function Impersonate) to do it properly.

Is there a way to do it with the console, without messing up the database?

I know the basic stuff (`./launcher enter app` then `rails c`) but not the exact command to do.

Thanks, it would relieve me a lot!

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 Marzo 2018, 11:32pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/2 "2018-03-07T23:32:06Z")

</div>

@neil mentioned this command in a message earlier today. I’d wait for him to confirm this does what you’d like, and you’ll likely need to modify the command:

```plaintext
UserDestroyer.new(neil).destroy(user, delete_posts: true)

```

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [8 Marzo 2018, 4:15pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/3 "2018-03-08T16:15:34Z")

</div>

Yes that command will do it. If you want the system user to do it:

```plaintext
UserDestroyer.new(Discourse.system_user).destroy(User.find_by_username('...'), delete_posts: true)

```

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [8 Marzo 2018, 4:42pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/4 "2018-03-08T16:42:10Z")

</div>

> [@Steven](#):
>
> to Impersonate every account (like mine, or discobot)

I thought an admin could not impersonate another admin user?

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [8 Marzo 2018, 5:24pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/5 "2018-03-08T17:24:07Z")

</div>

Thanks neil I’ll try tonight 👍

@michaeld : I wasn’t a developper account at the time, he could’ve demoted me during his jokes

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [8 Marzo 2018, 5:50pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/6 "2018-03-08T17:50:46Z")

</div>

Admins can’t demote other admins.  
And you also say

> [@Steven](#):
>
> I didn’t find a way via Discourse with an admin account, or even a developper’s account (with the function Impersonate)

which is impossible as well… weird story.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [8 Marzo 2018, 7:06pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/7 "2018-03-08T19:06:47Z")

</div>

I just checked and a admin with developer access can impersonate anyone, including admin accounts

edit: worked perfectly, thanks @neil and @jomaxro - this is a relieve

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [8 Giugno 2024, 12:37pm UTC](https://meta.discourse.org/t/delete-my-account-with-the-console/82450/8 "2024-06-08T12:37:47Z")

</div>

Questo argomento è stato chiuso automaticamente dopo 2284 giorni. Non sono più consentite nuove risposte.
