When you delete a user, the roles ain't cleaned
Issue Summary
When you delete a user, the roles ain't cleaned
Steps to Reproduce
- Delete a user;
- And observe:
mysql> select users.id, users.name, roles.name from roles join roles_users on roles_users.role_id=roles.id left join users on users.id = roles_users.user_id;
+--------------------------+----------------+---------------+
| id | name | name |
+--------------------------+----------------+---------------+
| 1 | Adrien Giboire | Owner |
| 5984be102f295b5ab0bef447 | Adrien Giboire | Administrator |
| NULL | NULL | Author |
+--------------------------+----------------+---------------+
Technical details:
- Ghost Version:
1.5.0 - Node Version:
6.11.1 - Database:
mysql Ver 14.14 Distrib 5.7.19
Hey @AdrienGiboire, thanks for your report.
I can confirm, the roles_users entry is not getting removed when a user is deleted. PR is welcome 🙃
Trying to but having local issues.
@AdrienGiboire Thank you! If you need any help, swing by our slack channel and ask in the #contributing channel.
@kirrg001 Can you assign this issue to me? I want to fix it as my first commit.
@uname-yang I am not able to assign you, because you are not part of the Ghost Contributors group. But a fix for this is very welcome 👍
@uname-yang Any news? 🙃
I would like to work on this!
@dexterleng Thanks 🤩 If you need any help, let us know here!