KostonConsulting

Well-Known Member
Verifed Vendor
Jun 17, 2010
255
1
68
San Francisco, CA
cPanel Access Level
Root Administrator
You should look into the Standardized Hooks system. It does work with account create but may or may not work with adding reseller privileges:

Getting Started action code as a script


If it does not, you will need to either monitor the cpanel access log and parse calls to the page that adds reseller privileges or monitor /var/cpanel/resellers for changes.
 

KostonConsulting

Well-Known Member
Verifed Vendor
Jun 17, 2010
255
1
68
San Francisco, CA
cPanel Access Level
Root Administrator
can you provide me a sample code for that in php
I looked at there is no hookable event for reseller creation. You'll likely want to monitor changes to '/var/cpanel/resellers' as just looking at account creations would not capture adding reseller privileges after an account is created.

I'm happy to help point you in the right direction with your logic or if you have some code that you're wondering why it is not working, I can help dissect. Since reseller permission addition/removal is not hookable, I doubt anyone here has sample code for it.