Hi pcsousa,
A couple things have to occur for the outcome you desire.
1) The Apache/mod_userdir directive must be altered. Essentially, you'll be adding/updating a directive like "UserDir disabled $user1 $user" (
mod_userdir documentation)
2) There needs to be a signal and receiver process so that the remote call (create account) knows how to trigger the directive change
3) Might need a cleanup routine for when you remove users, depending on where the directive statement lives.
Now, I'm not an Apache guru, so I'll let someone get more explicit about setting directives per user, altering EasyApache profiles, etc. As far as the XML-API remote call is concerned, normally the 'signal' for a different type of user account would be a "plan". For our purposes, the actual contents of the plan don't have to differ. We're really just using the plan's name to denote 'treat the account creation differently'. Which brings us to the second part, the 'receiver'. You can use a
script hook, wwwpostacct, that will look at the "plan" value; if "plan" value is "silver" then we need to call some custom script that handles the Apache stuff for use. Otherwise if the "plan" is "gold" we leave leave the Apache stuff alone (in which case the UserDir directives are probably enabled for users by default).
Keep in mind, this will work for both remote calls as well as account creation in the UI.
The cleanup would work the same way: a script hook, but this time you want to make one for prekillacct. It might not be needed if the directive changes occur in some include/site include that is unique to the user; in that case cPanel will be deleting that file. Otherwise, if the directive changes is in the httpd.conf file...you have to manage it yourself.
Currently, there isn't a a script hook for when a plan is changes. For now, you'd have to do your own checking, may through a cron task.
Hope this gets you started in the right direction.
Regards,
-DavidN