listaccts api search User by domain

Renata Dias

Registered
May 27, 2016
1
0
1
Brazil
cPanel Access Level
Root Administrator
Please can someone help me?
how to search the User by domain

example:

Code:
$domain = 'mydomain.com';

$accounts = $whm->listaccts($domain);

        foreach ($accounts as $ac){
              $userCp = $ac["user"];
        }

        echo $userCp;
I've tried, but it does not work.

Thanks,
Renata
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463