alankis Posted October 26, 2015 Share Posted October 26, 2015 I have a registar module, which doesn't format telephone number according to a RFC XML EPP schema. I have created function, which checks phone number in $params["phonenumber"] and then format number accordingly. $params["fullphone"] number was not of use in my case. Now I want to format number, but not inside module file, because it will get rewritten in next update, so I put my code in hooks.php, and added a "PreDomainRegister" hook, which I have tested and hook is running fine. Problem, is that it seems, that I only can access module $params only from module file, which name is equal to module name. I have try dumping variable, and only thing I get out is Array ( [domain] => domainname.com ) . I have even try to return complete array back to hooks, but no luck: myregistarmodule/myregistarmodule.php {...} function myregistarmodule_ReturntParams($params) { return $params; } And then retrieve them in my hooks.php file, but still not luck: myregistarmodule/hooks.php {...} function hook_MyregistarmodulTest(array $params) { $params = myregistarmodule_ReturntParams($params); print_r($params); } add_hook("PreDomainRegister", 1, "hook_MyregistarmodulTest"); Is there any way for module paramaters to be avaliable to module hooks, or I have write queries inside my hooks? 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.