Check if username exists before attempting to create a domain

We've encountered this error when cloning a domain name:

Cloning domain wordpress.com to clone.com with username clone ..
Creating new domain settings ..
.. prefix clone is already in use by domain clone.anotherwordpress.com
.. cloning failed!

I am pretty sure it would output the same error when not cloning, but just creating a new virtual server provided there was already same username in the system. So instead of throwing error to the screen (and thus confusing inexperienced end-users) wouldn't be more appropriate to automatically modify duplicate username by adding some digits like, in our case, clone0, clone1, clone2, etc? Generally it's a good practice to leave to end-users as few errors as possible.

Status: 
Closed (fixed)

Comments

You're right, these kinds of prefix clashes should be impossible. I'll fix this in the next Virtualmin release.

Status: Active » Fixed
Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.