Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

International phone number CB Field group

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
1 year 3 months ago #335004 by activha
Replied by activha on topic International phone number CB Field group

create an auto action to create users then HTTP call the auto action from node.


yes I already have one so I guess it's the easiest.

One issue that I may have is that this process will go through SMS so the password may be an issue. Is it possible to have it generated automatically with an autoaction ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 3 months ago #335005 by krileon
Replied by krileon on topic International phone number CB Field group
The registration auto action will generate a password if you don't supply one so yes that's doable.


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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
1 year 3 months ago #335006 by activha
Replied by activha on topic International phone number CB Field group
Good !
And if my IA only asks for the name and email ? Would the auto action automatically issue a username ?

Then I’ll explain to the user to first login with its email

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 3 months ago #335007 by krileon
Replied by krileon on topic International phone number CB Field group
The only mandatory information for a registration auto action is the email address. Recommend just taking a look at the auto action as this is explained in the parameter descriptions.


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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
1 year 3 months ago #335077 by activha
Replied by activha on topic International phone number CB Field group
I have one question on these autoactions.

If it fails to register the user, could it send back the reason ? is there a way to get it ?

For now I have set something like :
Code:
$userid = (int) '[data1_user_id]'; $response = [     'success' => 'true',     'userid' => $userid,     'firstname' => '[data1_firstname]',     'refid' => '[data1_cb_refid]' ]; // Vérifier la valeur de userid if ($userid === 0 || !isset($userid)) {     $response['success'] = 'false'; } echo json_encode($response);

But I was wondering whether the answer would have something else than userid = 0 ?

I need to know for instance that the registration failed because the email is already existing so that I can ask the user to fill its phone number. I use this autoaction to register a user by SMS 

Any ideas on this ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 3 months ago - 1 year 3 months ago #335080 by krileon
Replied by krileon on topic International phone number CB Field group
An error is thrown if the auto action fails. You can get the error from the auto action object itself using the following.

Code:
$errors = $autoaction->error();


This will return an array of errors. So a common way of dealing with that is as follows.

Code:
$errors = implode( "\n", $autoaction->error() );


This should give you all the errors separated by a line break. The error won't be very user friendly though as it's supposed to output as part of the auto action debug output. So you may need to change the following language key to be more user friendly.

Key: AUTO_ACTION_REGISTRATION_FAILED
String:
Code:
:: Action [action] :: Registration failed to save. Error: [error]


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.
Last edit: 1 year 3 months ago by krileon.
The following user(s) said Thank You: activha

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

Moderators: beatnantkrileon
Powered by Kunena Forum