Skip to Content Skip to Menu

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

[SOLVED] REST API Style CB User Registration Direct URL Using Auto Actions

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 11 months ago #274156 by xengent
I'm afraid I'm not familiar with CB's API. I'd love a step by step on this. I see the code here

www.joomlapolis.com/forum/153-professional-member-support/228495-solved-cb-version-api-cb-version-205#258806

I'm assuming I'd create an action with:

Global
Type: Code
Triggers: None
User: Automatic
Access: Everybody

Action
Method: PHP
Code: Use link mentioned above
Return: ?

Then...

If I can't figure it out I will use the first method. If you can provide a step by step at some point that would be great.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 10 months ago #275158 by krileon
There's a registration action built into CB Auto Actions. If you need to register a user I recommend using it. Otherwise you'll need to review the API usage posted in that topic carefully for registering a user as it's not an easy task and is why an action is provided to do it.


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.

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 10 months ago #275185 by xengent
Thanks. I think I will stick with the Registration Auto Actions (super easy, thanks for your help).

One last question: Regarding the condition I'm using "[get_token] equals to", is there a way to give multiple people different tokens, and grab those tokens as part of the registration of the profile into a "Created By" dropdown (where the token is the value)?

I'm thinking maybe have multiple accepted values for that one condition, and then grab the value used in the string and use it as part of the profile registration as a dropdown?

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

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 10 months ago #275192 by xengent
Or, if there is a login action, with this Registration action following it, and the username of the person who logged in gets captured into the profile being registered, this would also suffice. In which case I probably wouldn't even need a token to validate.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 10 months ago #275203 by krileon

One last question: Regarding the condition I'm using "[get_token] equals to", is there a way to give multiple people different tokens, and grab those tokens as part of the registration of the profile into a "Created By" dropdown (where the token is the value)?

You can support multiple tokens by using a REGEX condition. Example as follows.

[get_token] Is REGEX /TOKEN_1|TOKEN_2|TOKEN_3/

Please note if you use special characters in the token you will need to escape them properly for REGEXP, but you should be fine with simple alphanumeric tokens. As far as storing the token yes you could set a fields value to [get_token] as needed.


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.

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 10 months ago #275213 by xengent
Works perfect. Thanks.

Can you point me towards a multiple action chain use case? I need to execute this, and then have the user redirected to a user list, which will have a search field passed onto it, to show the use that was just created into that list.

For example take the username from the string of the first action, and use that username as part of a userlist search (for an existing userlist that I have already created).

I can't seem to find the "action onaction" trigger. And if I did, I wouldnt know how to use it. Thanks again.

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

Moderators: beatnantkrileon
Powered by Kunena Forum