Jump to content

Using hook OverrideModuleUsernameGeneration with Plesk module


Recommended Posts

Hi,

 

I've recently purchased WHMCS and begun integrating it into our Plesk Panel. One thing I am trying to do right now is modify the username that's being sent to Plesk when a new service is created, and I've created a basic module addon for this purpose.

 

It seems that "OverrideModuleUsernameGeneration" is the right hook to use, but it doesn't seem to get called at all when I, for example, add a new order via WHMCS for shared hosting, but I can see that the new account is successfully created in Plesk. I've used logActivity() calls to verify the hook is not being called.

 

As a work-around, I have tried using the PreModuleCreate hook, but my changes to the $vars array (specifically $vars['params']['username']) are not kept, and so the username is never changed.

 

Any advice is appreciated.

 

Thanks,

Rhys.

 

- - - Updated - - -

 

Can't figure out how to edit my original post... Basically looking for advice on how to modify the username for newly created Plesk accounts... And advice OverrideModuleUsernameGeneration hook should be working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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