Results 1 to 8 of 8

Thread: Add a new field to account creation page for use with post account creation script

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Add a new field to account creation page for use with post account creation script

    Hi,

    I wanted to be able to add a field during account creation, something like an id so when that account gets created a post_account creation script can be run and that id can be sent along to a remote server.

    Thanks,

    Dennis O.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    570

    Default Re: Add a new field to account creation page for use with post account creation scrip

    Hi Dennis,

    At this time, there is not a way to pass custom variables (via CLI, XML/JSON API, or WHM's Create Account) during account creation.

    If you like, I can move this thread to the Feature Requests forum so it can be cataloged and other's can vote on it?

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Requests

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Add a new field to account creation page for use with post account creation scrip

    So I can't even pass new variables or create new text boxes on the account creation page in the gui so I can pass it to a post account creation script?

  4. #4
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    570

    Default Re: Add a new field to account creation page for use with post account creation scrip

    That's correct. Account creation cannot be extended.

    It seems that most people create their own custom account creation script/form (which is served by a billing application/system, or simply an internal webserver) which:
    1) gathers all the needed info in a form, from a database, etc.
    2) uses cPanel's XML/JSON API to request a new account be created (with the info that cPanel needs)
    3) if the API call returns with a successfully status, then prepare and execute requests to the other system (using the rest of the info initially gathered).

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Requests

  5. #5
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Add a new field to account creation page for use with post account creation scrip

    So, in the case where reseller creates an account, I would either have to periodically query for the accounts and see which ones I don't have in my system, or when that account is created match up the username that created the account to an account in my billing system. Why is that that the account creation can't be extended?

    I also just did a cursory look for the form that the cpanel account creation page seems to post to, but no dice. If this is not a file, where is it then? Will any modifications to these pages I make be overwritten by updates that cpanel does? I was thinking I could run tripwire to keep a track of any files I modify that then get modified by system updates.

    root@cpanel03 [~]# find / -type f -name *wwwacctform*

    root@cpanel03 [~]#
    root@cpanel03 [~]# find / -type f -name *scripts5*

  6. #6
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    570

    Default Re: Add a new field to account creation page for use with post account creation scrip

    cpuden,

    You won't find those form pages or functions. They are compiled into the WHM binary, and therefore you can't modify them. And even IF you could, the changes would be overwritten during the update process (and you'd be response for re-applying your changes, as you've alluded to).

    The ability to pass through arbitrary variables from Account Creation to the script hook system is a feature that must be implemented at the core of cPanel & WHM.

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Requests

  7. #7
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,053
    cPanel/WHM Access Level

    Root Administrator

    Question Re: Add a new field to account creation page for use with post account creation scrip

    I wonder if this might well be Feature Request worthy? Granted, I'm not sure I fully understand the OP's needs (I had a few minutes to kill thinking on this) but, if I take his words out of context a bit:

    ..something like an id so when that account gets created a post_account creation script can be run..
    Add in some very smart cPanelDavidN for good measure:

    Our script hook is now complete. If we place it in the /scripts directory and name it postwwwacct and set execution bits, it will execute each time an account is created.
    What if for some reason you wanted to have multiple functions in postwwwacct script to choose from?

    What if postwwwacct contained multiple functions within and each one had an ID that could be called by itself or all or none?

    If that was possible and you had an area to type in an ID variable on account creation that was seen as 'hey, theres a postwwwacct script sitting in here, lets go look and find an ID if we can or just run script'

    I'm well out of my realm here, just thinking out loud. Your answer will make me smarter.

  8. #8
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Add a new field to account creation page for use with post account creation scrip

    Thanks for the answers and the thinking out loud you guys. Let me mull this response over before we close this thread during working hours.

Similar Threads

  1. WHM Post Account Creation Script
    By adalpe in forum cPanel Developers
    Replies: 4
    Last Post: 01-27-2012, 08:17 AM
  2. WHM Post Account Creation Script
    By adalpe in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 08-28-2010, 04:20 PM
  3. Account creation script....
    By ProXHosting in forum cPanel Developers
    Replies: 0
    Last Post: 07-01-2006, 03:37 PM
  4. Default account creation page
    By IMS in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 03-28-2004, 03:14 AM
  5. Account creation through script
    By Pinocchi in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 12-10-2002, 10:43 AM