International phone number CB Field group

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

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

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

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

7 months 2 weeks 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 :
$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 to join the conversation.

7 months 2 weeks ago - 7 months 2 weeks 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.

$errors = $autoaction->error();


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

$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:
:: 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.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.209 seconds

Facebook Twitter LinkedIn