Trigger a community builder user subscription/sign-in with a script

11 months 6 days ago #333883 by krileon
I wasn't able to confirm, but added some failsafes that normal frontend user registrations apply that will prevent this.

forge.joomlapolis.com/issues/9175

I've also added support for randomized usernames (simply leave username parameter blank). I've also fixed emails not including the password when using randomized passwords (simply leave password parameter blank). It will also check if the username is already in use before trying to store the user and will cancel out the auto action instead of causing a fatal SQL error.

This is all available now in latest build release. Please update and let me know if still having issues.


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 to join the conversation.

11 months 14 hours ago - 11 months 13 hours ago #333962 by huguesmarcil
Hello Krileon,
Thanks for your help! It works perfectly :D
However, the passwords are written in clear text in the database and we are forced to generate a new password (hashed) to connect.

Meanwhile, I tried the API again, in a blank form. I had never tried this before and wanted to know if there was a problem that was not our side.
Apparently, the API is also facing a problem. I can register, but there is no activation code.
As you solved a problem with a missing activation code for CBAutoActions, maybe it's the same here :)
Thank you,

Hugues

Please Log in to join the conversation.

10 months 4 weeks ago #333972 by krileon

However, the passwords are written in clear text in the database and we are forced to generate a new password (hashed) to connect.

That shouldn't be possible. Clear text passwords are restored just before the activation behavior so they can be included in the emails. This happens just before the onAfterUserRegistration trigger. Are you doing any behavior on the onAfterUserRegistration trigger that could be causing a user stored as that could accidentally be causing clear text store.


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 to join the conversation.

10 months 4 weeks ago #333974 by krileon
Ok, released a new CB Auto Actions build to make cleartext password as late as possible to avoid possible conflicts with other stores. I've also updated the registration tutorial below with the same usage as the CB Auto Action.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18362-registering-a-user-through-cb-api


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 to join the conversation.

10 months 2 weeks ago - 10 months 2 weeks ago #334078 by huguesmarcil
Hello Krileon,
Thank you again for this intervention which pays off!
- the auto-action registration now works and the passwords are well encryptred in the database
- the API now also works and manages the registrations from our custom form
However...
Since the API now works like before we do not need CB Auto Actions anymore . In fact, we actually prefer to use the API because it avoids us having to do any further custom development, it works perfectly as is.

On the other hand, we suppose that CB Auto Actions (or any add-ons we have access to with our pro membership) can help us send e-mails because this is what we currently need to do.
To be more specific, we need to send an e-mail to a subscribed user (the advertiser) once another new user (the requester) confirms his account in order to put them in touch.
How would you do that using CB add-ons? Any documentation would be appreciated.
Thank you in advance,
Hugues

Please Log in to join the conversation.

10 months 2 weeks ago #334082 by krileon

Since the API now works like before we do not need CB Auto Actions anymore File Attachment: . In fact, we actually prefer to use the API because it avoids us having to do any further custom development, it works perfectly as is.

Use whatever works best for you. The benefit of CB Auto Actions in this case is the registration process is extracted away so you don't have to maintain it. When the registration process changes, CB Auto Actions is updated, and you don't have to do anything but update.

To be more specific, we need to send an e-mail to a subscribed user (the advertiser) once another new user (the requester) confirms his account in order to put them in touch.
How would you do that using CB add-ons? Any documentation would be appreciated.

You'd need something to link those 2 users together. I assume you already have such something (e.g. user id stored in a field, a query field to lookup the user, etc..)? In which case you'd use just an Email action on onAfterUserConfirm trigger.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.185 seconds

Facebook Twitter LinkedIn