Skip to Content Skip to Menu

How to show username when registrate with invite code

  • camdri
  • camdri
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 6 months ago #262932 by camdri
I want to fill in a field called "Name sponsor" automatically when the user is redirected to the registration page, after following the link in the mail from CB Invite.

Now it delivers an invitation code that can be seen on the registration page automatically. How can I show the "Name sponsor"being the name of the user that belongs to the invitation code?

thanks for any help / suggetions

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262947 by krileon
You would need to modify CB Invites to output that or modify CB Query Field to have an edit display so a query could be made for the username of the user who sent the invite code. We don't have anything out of the box to display that information.


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.

  • camdri
  • camdri
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 6 months ago - 9 years 6 months ago #262954 by camdri
OK but what kind of query do I need (Select USERNAME FROM DB_IVITES where INVITE_CODE= "#12345") or something like that?
I really don't know the name of the database tables and records.

Of course there is no standard solution, but can it easily (without editing the original code) be done with CB Query Field?
Last edit: 9 years 6 months ago by camdri.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262960 by krileon
CB Query Field has no edit display so it won't show up on registration or profile edit views. I guess you can try forcing it by substituting in the profile view of a query field into a Custom HTML field, but as the user is not yet registered it probably won't display anything. At any rate the query would be as follows.

Code:
SELECT u.`username` FROM `#__comprofiler_plugin_invites` AS i INNER JOIN `#__users` AS u ON u.`id` = i.`user_id` WHERE i.`code` = '[invite_code]'


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.

  • camdri
  • camdri
  • OFFLINE
  • Posts: 35
  • Thanks: 0
  • Karma: 0
9 years 6 months ago - 9 years 6 months ago #262965 by camdri
Let me try to explain what I want:

User A invites Person B. Person B gets an email with a link to register and the Invite code is automatically filled. Then Person B clicks on the link and goes to the registration page and sees the Invite code already filled in.

What I would like is something like:

If Invitecode is not empty then SponsorName = FormatName WHERE UserA.Invitecode = Invitecode (filled in on the registration form)

Does this make any sense? And is this possible?
Last edit: 9 years 6 months ago by camdri.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262967 by krileon
You'll have to try using CB Query Field with the above query for that, but I'm unsure if it'll work. Ensure CB Query Field is ordered after CB Invites in CB > Plugin Management in hopes the user object is populated by the invite code before CB Query Field tries to use it in its query.


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