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?
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.