Skip to Content Skip to Menu

Validate a CB username from a form on another website

9 years 7 months ago #261133 by pipingdesigners
Just wondering if anyone has a solution for the following:

I want to work with a partner website (not my own), that will give a discount on their product to users of my website.
I would like them, as part of their registration for the deal, to validate that the user is also a user on my site.

I could simply give them a file containing usernames that they could validate against, but with many users joining my site daily, and a user base of over 5000, I am looking for a solution whereby, once the username is entered on the partner site, and the 'validate username' button is pressed, that it looks ups the username field from my database, and sends back a yes/no or 1/0 type response.
If it's a yes, the registration may proceed.

I'm not looking for the solution on their end, just a solution for my end.

I want a method that they can have access to query the usernames field on my CB database, and get a yes/no response.

Has anyone done something like this?

(I'm not an SQL programmer, or anything like it, so please go easy on me!!)

Thanks,
Anton

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 7 months ago #261139 by nant

pipingdesigners wrote: Just wondering if anyone has a solution for the following:

I want to work with a partner website (not my own), that will give a discount on their product to users of my website.
I would like them, as part of their registration for the deal, to validate that the user is also a user on my site.

I could simply give them a file containing usernames that they could validate against, but with many users joining my site daily, and a user base of over 5000, I am looking for a solution whereby, once the username is entered on the partner site, and the 'validate username' button is pressed, that it looks ups the username field from my database, and sends back a yes/no or 1/0 type response.
If it's a yes, the registration may proceed.

I'm not looking for the solution on their end, just a solution for my end.

I want a method that they can have access to query the usernames field on my CB database, and get a yes/no response.

Has anyone done something like this?

(I'm not an SQL programmer, or anything like it, so please go easy on me!!)

Thanks,
Anton


I guess - if the other site is also using Joomla and CB you could use a CB Query field to handle the validation. An example is here:
www.youtube.com/playlist?list=PLp0puRITgC7MM9iP9FooKB1qk8f5MLWVp

So basically you would need to somehow give access to your user database to the other site so they can validate on their own.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 7 months ago #261172 by krileon
As Nick suggested CB Query Field can help with this, but you'd need to give fully root database login access to your partner site which I HIGHLY suggest you don't do unless you're operating both.

The alternative is to develop something to provide a rest endpoint to validate a username. Your partner site would then need to develop something to send an ajax request to that endpoint. Your site would simply return a json response with true or false if the username is valid. As it's just username, which is core Joomla, there maybe a Joomla extension that can provide the endpoint; recommend checking Joomla.org extension directory.


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.

9 years 7 months ago #261182 by pipingdesigners
Replied by pipingdesigners on topic Validate a CB username from a form on another website
Thanks guys,

I'll check out some extensions .... any thoughts on this one: www.selfget.com/products/jbackend.html

I'm guessing it's what i'm looking for.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 7 months ago #261236 by krileon
No idea. I've no experience with it. All I can suggest is try it and see if it fits your needs or contact the developer with what you're wanting to do and see if their extension can provide what you're needing.


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