The problem is, that I'm trying to find a way, to check for the project name. The default way of creating a subdomain is projectname.username.md2site.com
Right now I can try to check, if there is another project, that uses this subdomain. But the problem starts, when:
Scenario 1
- UserA creates ProjectA. Names it
test. He getstest.username.md2site.com - UserA links DomainA to ProjectA.
- In database, we have now ProjectA linked to DomainA
- UserA creates ProjectB. Names it
test. - Crash
Scenario 2
Unlikely, but explains the problem
- UserA creates ProjectsA. Links DomainA.
- UserA cancels DomainA at domain provider.
- UserB acquires DomainA.