Jump to content

Creating Random Passwords


Recommended Posts

Hello guys,

 

I need your help, I want this to creating random passwords for my customers and uneditable text field:

 

/whmcs/templates/orderforms/standard_cart/configureproduct.tpl

<input type="password" name="rootpw" class="form-control" id="inputRootpw" value="{$server.rootpw}">

 

Thank you so much, God bless us.

Link to comment
Share on other sites

You can absolutely do this through smarty and hooks actually. Take a look at Templates and Custom Variables documentation

 

#1: Create a function to generate your passsword . Something like this will do

#2: Create a hook that's called only on order pages

#3: Assign the password created in step 1 to a smarty variable

#4: Edit the configureproduct.tpl template, change the input type of 'password' to hidden. Make sure to mail them the password

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