I use this function to query whether I can use an account name during the creation process of an external application.
When I query as root this reports an account, however when run as a reseller, it only returns a value if the account is owned by the reseller, if the account name is taken by another reseller it returns nothing and we then get an error when attempting to create an account.
Is it possible for this to return an indicator that the account name is in use but not give out details or is there another function I can call to validate an account name or to generate a valid one from the domain name or some other string?
Whilst I can run as root on the servers we manage, some of our customers are resellers on other suppliers servers, so I need a solution that will work at the reseller level.
I could just keep creating new usernames and running the createaccount function until it doesn't fail, but that's not very nice code
When I query as root this reports an account, however when run as a reseller, it only returns a value if the account is owned by the reseller, if the account name is taken by another reseller it returns nothing and we then get an error when attempting to create an account.
Is it possible for this to return an indicator that the account name is in use but not give out details or is there another function I can call to validate an account name or to generate a valid one from the domain name or some other string?
Whilst I can run as root on the servers we manage, some of our customers are resellers on other suppliers servers, so I need a solution that will work at the reseller level.
I could just keep creating new usernames and running the createaccount function until it doesn't fail, but that's not very nice code