subdomain_owner_check: Allow sub.sub.domain.com if sub.domain.com is already in list

Version 1.41

Bugfix
Finished

Assume: 1 - domain.com is owned by user2 2 - sub.domain.com is already created under user1 3 - user1 is trying to create sub.sub.domain.com Previously, point 3 would fail because the subdomain_owner_check only found domain.com, and noted that it didn't belong to user1. With this change, an additional check is done with sub.sub.domain.com, starting with sub.domain.com.. to see if it exists in the domains.list file of user1. If a subdomain exists in the domains.list of user1 (sub.domain.com), then a double-subdomain (sub.sub.domain.com) is now allowed to be created by user1. This change is not affected with the check, when a new User is being created... which makes sense, since a new User won't yet have any domains anyway.

Interested to try DirectAdmin? Get a 30-day Free Trial!