codemaster2008 Posted December 29, 2009 Share Posted December 29, 2009 Hello there; I downloaded the "Module Development Kit" and I'm surprise with the documentation: One single page Well, maybe because it's really simple to create a module, however, i can't find an answer to my question and hope somebody out there can help me: Can i send the WHMCS unique "customerid" to my Control Panel on the mymodule_CreateAccount($params) function? It has a "clientsdetails" array but comments/documentation says: # Array of clients details - firstname, lastname, email, country, etc... So, it doesn't say if the Customer ID is included on the array. It should be possible because "i believe" WHMCS will only execute the "_CreateAccount" function after the client has been created. The reason i'd like to have WHMCS client's ID on my custom control panel is to allow it to call functions like "Add Billable Item" on WHMCS's API. Thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
vePortal Posted December 29, 2009 Share Posted December 29, 2009 Tip: When using it add the following: print '<pre>'; print_r($clientdetails); print '</pre>'; Then try to use the module (create button) and it will print an array on the page of all information held in that array. I would assume your looking for ($clientdetails["uid"]) (UserID) OR failing that add this: $getuid = mysql_query("SELECT * FROM tblclients WHERE email = '".$clientdetails["email"]."'"); $u = mysql_fetch_array($getuid); $clientdetails["userid"]=$u["id"]; (May need modification as untested). 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.