Jump to content

DeuxK

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by DeuxK

  1. Hi, I am developing a small module that would create an additional FTP user with a directory dedicated this user. For the creation of the module, everything is fine. By cons, for hooks, I'm sure of nothing! I activated the addon after the creation of my hooks.php. I would like to know if I do the right thing. Here is the code: add_hook('AddonActivated', 1, function($vars) { //Get Product/Service information to get domain and relid $command = 'GetClientsProducts'; $postData = array( 'serviceid' => $vars['serviceid'], 'stats' => true, ); $service = localAPI($command, $postData); print_r($service); //create FTP user (is OK this part) //Save to custom fields associate to the addon }); 1- Is this the correct hook to create my FTP when activating the addon? 2- Would there be a way to see what my print_r return? 3- What would be the best way to register the associated customs fields? For more information, my addon is used to create an FTP user with a directory of his own to be able to deposit certain document without having access to anything else. Thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated