Skip to Content Skip to Menu

Additional fields for user accounts

3 days 1 hour ago #340358 by m.o.skirde
Additional fields for user accounts was created by m.o.skirde
Hi there :-)

I'm part of a MLM community, where I have a member who is my upline - called sponsor, and members I'm responsible for - my downline. I will use CB for the communication and training for my downline members. In order to avoid signing up strangers who are not members of this community, I have the idea of implementing two additional fields to identify my users and their position inside the community (who belongs to whom).

So the first field would be called "SponsorPIN" and the second field should be called "MyPIN". As I set up a user account for my sponsor, I would insert his PIN (as well as mine) manually.
When a new user signs up, he has to fill out both fields, and there should be verified that his entry of "SponsorPIN" is matching an existing "MyPIN".

Hopefully my description is not too confusing - my english is not perfect as I come from germany :-)

I would be really thankful, if you can guide me in the right direction step by step, as I'm a newbie to CB and not a programmer.

Best regards & thanks in advance,
Mark

 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48844
  • Thanks: 8346
  • Karma: 1449
2 days 15 hours ago #340360 by krileon
Replied by krileon on topic Additional fields for user accounts
That's doable, but you'd need to figure out what those pins are exactly and where they should be stored. Do you have a database for these pins already? It's also possible to have an Invite Only site using CB Invites as well if that might work better for you.


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.

22 hours 49 minutes ago #340386 by m.o.skirde
Replied by m.o.skirde on topic Additional fields for user accounts
Hi Kyle, thanks for your quick reply as well as sorry for my delay - I was out of office ...

Does CBInvites store who invited whom even after the new user signed up? Sorry my stupid question but it indicates my level of knowledge
If this is the case, this would be the perfect workaround. On the other hand, I have to setup those fields anyway, to ensure through this additional verification that nobody outside my MLM Downline is allowed to signup. Maybe we can extend the user table of CB for this pupose? If yes - how?

Kind regards from germany,
Mark

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48844
  • Thanks: 8346
  • Karma: 1449
15 hours 21 minutes ago #340391 by krileon
Replied by krileon on topic Additional fields for user accounts

Does CBInvites store who invited whom even after the new user signed up?

Yes, it just remains in the invites tab and is noted as accepted and with whom accepted it.

If this is the case, this would be the perfect workaround. On the other hand, I have to setup those fields anyway, to ensure through this additional verification that nobody outside my MLM Downline is allowed to signup. Maybe we can extend the user table of CB for this pupose? If yes - how?

Setup those fields where? If they're just stored with profiles then yes you could just make CB fields in CB > Field Management for storing the pins. Validating "SponsorPIN" against another users "MyPIN" is also easy to do with CB Query Field and its Query Validation so that's perfectly doable too. CB Invites suggestion was just a way to do it more organically through invite links and avoid extra fields, but the fields solution would work fine.

To do this you should only need the following.

Field 1: cb_sponsorpin
Field 2: cb_mypin

I assume both are text fields? Whatever works best for you. Next add the following to the cb_sponsorpin field.

Integrations > CB Query Field > Validation
Query Validation: Enable
Query:
Code:
SELECT `id` FROM `#__comprofiler` WHERE `cb_mypin` = '[value]' LIMIT 1
Validate On: Successful Results
Error Message: Sponsor is invalid. Please provide a valid sponsor to register.
Ajax Validation: Enable

That should work for your current field setup. Feel free to adjust the query validation 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.

Moderators: beatnantkrileon
Powered by Kunena Forum