ReFlar / polls

[ABANDONED] See https://github.com/FriendsOfFlarum/polls
MIT License
14 stars 14 forks source link

Delete Polls When User Is Deleted #46

Open Ralkage opened 5 years ago

Ralkage commented 5 years ago

Not sure if this is a bug or should just be put as a feature but when users are deleted VIA user profile UI option, their discussions and posts get deleted but their polls don't.

There should be added functionality that when this action occurs, the user's polls in the database get deleted as well.

dsevillamartin commented 5 years ago

We either want to keep the poll or CASCADE on delete. Flarum for beta 8 has a DB changes PR, not sure if CASCADE or keeping discussions & posts like reddit does was decided.

KyrneDev commented 5 years ago

Let's just modify to use cascade, flarum forces innodb now so we should have 0 issues.

Ralkage commented 5 years ago

@datitisev or @CDK2020 lets get this implemented by the end of this month if possible 🤗

JoshStrobl commented 5 years ago

I'm actually facing an issue as well with not being able to delete the user when they've engaged in a poll. See https://github.com/flarum/core/issues/1802#event-2444347556

dsevillamartin commented 5 years ago

We probably want to support [deleted] users, so apart from a migration (set null on delete), some code will also have to be rewritten to allow for non existent users's votes.