Custom POST variables in scripts/standardized WHM Hooks

pijulius

Member
Jan 31, 2009
7
0
51
Hi Guys,

I read as much as I could about hooks in whm and specially I would need to add my own hook after an account has been created.

It was very easy to set up a post script hook by simply creating the
Code:
/usr/local/cpanel/scripts/postwwwacct
file and this works perfectly but now here is the problem I'm facing:

I have some custom input fields in the
Code:
/local/cpanel/whostmgr/docroot/templates/createacct.tmpl
file and I would need to access those input values from the hook script but unfortunately the only variables that get forwarded to the hook script are:
cPanel & WHM Script Hooks

I also saw that there are Standardized Hooks but unfortunately we only have WHM 11.30 and the standardized hooks have been only introduced in 11.32 so I can't test that too so my question would be:

Can I access custom POST variables from a script or standardized hook and if so what would be the best way to do it.

Thanks in advance!
 

pijulius

Member
Jan 31, 2009
7
0
51
Yes, I think it is. The two topics don't really have anything to do with eachother. One is to add custom fields to a template without modifying the template and the other is about using those custom fields from a hook. I managed to do the first by modifying the template (as I haven't found any way to set the custom_fields from outside the template file let say from another hook or API) but now even if I have my fields set into the template file I can't access them from the hooks so I think this is a totally different matter/question.

Is there a reason why we need two threads on this same topic?

http://forums.cpanel.net/f42/modify-whm-create-new-account-template-250612.html