Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Set default value for password

  • autobahn
  • autobahn
  • OFFLINE
  • Posts: 202
  • Thanks: 38
  • Karma: 4
8 years 4 months ago #282262 by autobahn
Set default value for password was created by autobahn
How can I set a default value for the Core CB field 'password'?

The password field is not displayed at Registration so no default value can be specified in Field Management Edit.

I use a CB Auto Action with triggers onAfterNewUser and onAfterUserRegistration to:
  1. generate a membership number (which works fine)
  2. generate a username based on input values (which works fine)

The third action in this Auto Action is to set the value of the Core CB field 'password' - but this doesn't work.

The thought has occurred to me that maybe it is working but I should be using the encrypted equivalent instead?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 4 months ago #282287 by krileon
Replied by krileon on topic Set default value for password
You can't, that doesn't even make sense to have a single default value for password field. If it's not available for a user to supply a password then one will be generated. The password field on store will encrypt so if you do change it then no you don't need to encrypt it as it'll do so on store.

There could be any number of reasons why the password didn't store from CB Auto Actions. Most commonly it's due to a store that fired after the action. If you are chaining multiple field actions together be sure to tell your action to reload the user object under parameters or do it all in 1 action.


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