Skip to Content Skip to Menu

Define format for auto generated passwords

  • softforge
  • softforge
  • OFFLINE
  • Posts: 129
  • Thanks: 21
  • Karma: 12
9 years 9 months ago #258061 by softforge
We have a requirement for a CB2 site that the password must be a pin number of a specific length. I can enforce this on registration using the options in the password field but if someone uses the forgot login feature, the new password generated is alpha-numeric.

Is there any clever way (eg. using auto actions) to intercept the password generation mechanism and change it to a format and length that we define? Or maybe after the new password has been generated but before the new password email has been sent out, update the password, suppress the automatic email and send out our own email? Or would I need to hack CB to do this?

Many thanks :)

If you like our plugins, please consider writing a review on the Joomla Extension Directory or the Community Builder Directory ...

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #258112 by krileon
Replied by krileon on topic Define format for auto generated passwords
CB doesn't generate the password. At most CB can specify a length. We directly call the below Joomla API for generating passwords.

JUserHelper::genRandomPassword( $length )

This is done via the getRandomPassword CB user object function. The Joomla function doesn't allow customization beyond length though so I'd imagine you'd just make your core changes in Joomla if you want strict characters/length.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
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 CST to 4:00 PM CST. 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.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum