Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

listaccts api search User by domain

Discussion in 'cPanel Developers' started by Renata Dias, May 27, 2016.

Tags:
  1. Renata Dias

    Renata Dias Registered

    Joined:
    May 27, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,452
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice