Alter the generated password

1 week 13 hours ago #308475 by MarlonFungai
Thank you so much for taking the time look at this again. I see that you have built the new field action for release with the next CB Auto Actions release which is great. In the meantime am I now able to create a plugin that will achieve the same effect using the current codebase? If so what trigger would it act on and what would be the general algorithm to apply?
6 days 14 hours ago #308490 by krileon
Next release will just allow you to use a Field action to generate random passwords instead of needing to code it. I was able to successfully generate a new password on the onAfterSaveUserRegistration trigger, but that trigger is fired after emails are sent. Sorry, I don't have a solution for you.

I've added a feature ticket to add a parameter to CB it self to allow changing the length of generated passwords.

forge.joomlapolis.com/issues/7343


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.
6 days 13 hours ago #308493 by MarlonFungai
Ok hypothetically speaking what would happen if you simply removed the password field from the registration form and didn't set CB to generate passwords? What would CB use for the password?
6 days 13 hours ago #308498 by krileon
In that case CB will ignore your settings of not using generated passwords and force it on to generate a password. For now I recommend just modifying core code. Next release hopefully should have the parameter for you to easily change the generated password length.


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.
The following user(s) said Thank You: MarlonFungai
2 days 6 hours ago #308563 by krileon
Ok, latest nightly includes a new trigger to allow deeper customization of randomly generated passwords. For your usage you're just wanting to reduce the length which you can do with the below.

Global
Triggers: onUserRandomPassword
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var2'] = 6;
Parameters
Reference Variables: Variable 2

The new trigger is as follows.

$_PLUGINS->trigger( 'onUserRandomPassword', array( $this, &$length ) )

var1 being the user object and var2 is the password length. Since var2 is a reference variable the length can be altered from an auto action.


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.
The following user(s) said Thank You: nant, MarlonFungai
1 day 22 hours ago #308564 by MarlonFungai
Thank you so much this is a huge help. I will test it out today.
Moderators: beatnantkrileon
Time to create page: 0.388 seconds
Facebook Twitter Google LinkedIn