Possible Bug in Database Deletion Script

Hello everyone,

I think I have found a bug at Virtualmin.

I create a database. Then I create a user. I give access to that user to the database created earlier. Then if I delete the database, without removing access to the database from the user, the user is stuck at User Permissions at MySql server. Finally, I delete the user. I recreate a database. I recreate the user (the name must be the same) and I try to give him access to the database again. It fails and it says the following message: "Failed to save mailbox : A database login with the same name already exists"

The only solution is the master admin to remove the user from mysql manually.

Ofcourse if I delete the user before deleting the database there will be no problem.

I believe that must be a bug to database deletion script. The proper way would be to check if any users have access to the specific database and remove them from mysql user table.

I am waiting to hearing your opinions.

Regards,
Panos

Status: 
Closed (fixed)