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!

How to check if a username already exist with AJAX?

Discussion in 'General Discussion' started by dber, Feb 10, 2008.

  1. dber

    dber Member

    Joined:
    Feb 10, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    I've create an automated script to create cpanel account, alongside with the cpanel account details the user should also enter some other details.

    I've added AJAX validation to most of the fields but I don't know how can I check if a cpanel username already exist with AJAX?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The listaccts XML-API function allows you to search for accounts using a Perl Regex:

    http://www.cpanel.net/plugins/xmlapi/listaccts.html

    Perhaps you could integrate that into an AJAX solution.
     
  3. wsenter

    wsenter Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Texas
    Also how about you post your code to help someone in the future out. Also someone might even be able to then offer you better tips on your coding and/or give you some code to add further functionality.
     
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