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!

Createaccount question(s)

Discussion in 'General Discussion' started by ChadK, Sep 2, 2004.

  1. ChadK

    ChadK Registered

    Aug 31, 2004
    Likes Received:
    Trophy Points:
    When a new user verifies his email address, I want to set up a tiny little web space for them.

    Some things I'm still having trouble with on my site when creating default webspaces for users is:

    The users name. If it has _ or punctuation etc, cpanel strips that information out when creating the account so the account login isn't identical. I'd like to force them to use more restrictive user names when registering to ensure it's compatible with CPanel. This is a software issue on my end of course. (Invision Power Board)

    The email address when creating an account is blank. I'd like it to populate with the address they registered with. I also need to add an email that sends them their login information and instructions on using their new site. I saw but I have no idea how to use that from PHP... yet. Sounds like I need a php version of this because I don't own the server I'm on so I doubt I can write this script to the scripts directory mentioned on that page. Also, perhaps it's possible to have one script accomplish both tasks? Create the account AND email the user?
    //Create default web-space
    require '/usr/local/cpanel/Cpanel/';
    $host = "localhost";
    $user = "your_WHM_account_name";
    $accesshash = "Your accesshash without any comments.";
    //this is created on your WHM panel
    //for me, I am going to create a default space
    //for every user when they validate their account
    //on my site.
    //This also would be changed to suit your needs.
    //the default plan for the user
    //my _free plan is very very basic with only 
    // a few features available.
    //set this to 1 if using this api call from 
    //another domain/server
    createacct ($host,$user,$accesshash,
    //end default web-space

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