Disable CMD_CHANGE_DOMAIN and Main Domain Deletion by User

hamster

New member
Joined
Nov 16, 2008
Messages
3
Would it be possible to entirely disable CMD_CHANGE_DOMAIN and domain deletion at the user-level?

I will be running a free host using DirectAdmin with a self-made signup panel. The problem here is that the panel would check for the subdomain's existence from the users table in the MySQL DB before allowing someone who's signing up to use the subdomain.

As you can see, if user-level access allows the addition and modification of subdomains, my entire account signup process would be screwed up :S

A friend suggested that I used a ping to check for the existence of the domain instead of checking from the DB, but that would be avoiding the main problem, so I'd prefer not to do so.

What I'd hope to be able to do, is to stop users from deleting their main domain or all domains and from modifying their pre-existing domains. It would be awesome too if the users can't add more subdomains of domains they do not own to their account.

Cheers and thanks for reading! :)
 
Hmm... I managed to write a script grab a list of all the domains/subdomains in use by all the users so far. I guess I'll just have to use preg_match for the time being to check whether the domain/subdomain is in use.
 
I think the best solution is the use of the DA API... You can use the CMD_API_DOMAIN_OWNERS and see if the domain is already to someone... I pretty easy to make with PHP...

And if you use the API for the account creation, the API will show you an error to tell you if the domain is already in use...
 
Last edited:
Back
Top