Jump to content

Force client to choose username for DirectAdmin accounts


Gears

Recommended Posts

Hello,

 

Instead of having the username be the first 8 chars of the domain, we want to force the customer to choose his/her username. I was told we must use ActionHooks since the php file is encoded. I have visited http://wiki.whmcs.com/Action_Hooks but I am not sure how to implement it.

 

Inside actionhooks.php I see the following function:

function actionhook_AfterModuleCreate($vars) {

# This function runs when a module creation command completes successfully - various variables available

}

 

But this function runs after the create command completes successfully.

 

I started by creating a custom field [ProductCustom-Username] and made it visible in the order process and also required. Now I just need to make the module create command use [ProductCustom-Username] as the username instead of the default first 8 chars of the domain.

 

Can anyone shed some light as to how we can achieve this using ActionHooks? Thank you in advance.

Link to comment
Share on other sites

  • 2 weeks later...

i agreed, i also prefer to have my clients choosing a username. I dont like the way where first 8 character is used. I got funny clients complainting that their username sucks.

 

For example i have a client domain http://www.iamemoforever.com and his user is iamemofo he say he cant remember it. and i have to delete his account and remake it again. so sucks...

Link to comment
Share on other sites

  • 2 weeks later...

For example i have a client domain http://www.iamemoforever.com and his user is iamemofo he say he cant remember it. and i have to delete his account and remake it again. so sucks...

 

Why delete it?

You can change username from WHMCS and then rename user from DirectAdmin...

 

But I agree with changes to username creation alghoritm.

 

I prefere a numerical random ID, like 45345, 65646, and so on...

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