Alter the generated password

3 months 1 day ago #306240 by MarlonFungai
I would like to change the generated passwords created on registration to maybe a 6 digit number or even a 4 letter combination my client finds the current passwords too complex. How can I achieve that?
3 months 18 hours ago #306257 by krileon
There's no functionality to change the length of generated passwords. They are 12 characters long because that makes for a very secure password.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
3 months 18 hours ago #306258 by MarlonFungai
I understand that but my client doesn't if I have to hack the code I don't mind where can I find the generation function
3 months 18 hours ago #306261 by krileon
You can find the password generating function in the below file as part of the user object.

/libraries/CBLib/CB/Database/Table/UserTable.php

Beyond location we can not help any further as we do not support core edits. You will have to re-implement your core edits on every CB update as well.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
2 months 1 week ago #306673 by MarlonFungai
Is it possible to use a code Auto Action to set the password at registration?
2 months 1 week ago #306684 by krileon
Probably best way to do that is a Code action as follows.

Global
Triggers: onBeforeUserRegistration
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var1']->password = SET_ENCRYPTED_PASSWORD_HERE;
Parameters
Reference Variables: Variable 1

To use existing password generator you could set the code to the below for example.

$variables['var1']->setRandomPassword( 6 );

That should set their password to a random one with 6 characters before they've registered. You may need to use hashAndSaltPassword as well to encrypt the password as I don't recall if that process happens before that trigger or after it (assuming after).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Moderators: beatnantkrileon
Time to create page: 0.388 seconds
Facebook Twitter Google LinkedIn