The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    6
    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