[SOLVED] online ID card with QR Code and verification

9 years 11 months ago - 6 years 10 months ago #244983 by schrammelmann
Hi there,

I want to build a (online) club or ID card with the help of CB, CB Subs and a QR-Code plugin.
The ID card shold be able to be printed or displayed on mobile devices (eg over the content module).

To check the authenticity of the ID card and the valid membership (CB Subs) it should be possible to display the card data on another device by scanning the QR code. This Code should link to the online card.

Problem 1: How can I make profile data visible for other users (logged in or not) without that they are visible for all in the normal profile too?

Problem 2: The URL to the online ID card should look like this, so you can not spy out user data:

www.mydomain.de/identity?u=jhgjsdfb88df98w4bzdc8s7dtf3gdk3ud3dg

Does anyone have an idea how to implement this on a easy way (same or similar)?

Thanks for ideas

Michael

Please Log in to join the conversation.

9 years 11 months ago #245000 by krileon

Problem 1: How can I make profile data visible for other users (logged in or not) without that they are visible for all in the normal profile too?

I don't understand the question. You want profile data public, but not public? It's either public or it's not. This is an absolute and is toggled within CB > Configuration > User Profile. You can expand on profile access by using CB Privacy and its profile privacy field, but it's a user by user usage.

Problem 2: The URL to the online ID card should look like this, so you can not spy out user data:

You would need to develop a Joomla extension or CB component plugin to handle this as you'd need custom PHP parsing, etc..

The most simple way is to generate QR codes from profile URLs. I think someone may have already done this through, please search.


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.

9 years 11 months ago - 9 years 11 months ago #245007 by schrammelmann
Hi Kyle,

thanks for response!

krileon wrote: I don't understand the question. You want profile data public, but not public?


I understand that you do not understand :laugh:
I try to explain it on another way.

I just want make profile data public over an encrypted URL. They would be protected for unauthorized access by these encrypted url.

Use case: At a reception of a campsite the employee should be able to check the data via QR Code from the users Profile of my website to give a discount (without login, because he is no member).

But I understand, this is simply not possible out of the box. I will try to develop a plugin or something, or I get another idea to realize a online member card.

Maybe someone has an idea, please let me know.

Thanks kyle, thanks all.

Michael

Please Log in to join the conversation.

9 years 11 months ago #245010 by krileon

I just want make profile data public over an encrypted URL. They would be protected for unauthorized access by these encrypted url.

I see, CB doesn't have any such feature, but you maybe able to fake it a bit with CB Auto Actions. You'd need to create a CB Auto Action that acts on the before profile display trigger. This could be a redirect action for example. In the conditionals you could condition against a CB field. So lets say you've the below example.

URL: index.php?option=com_comprofiler&task=userprofile&user=42&key=abc123

Notice I've appended the "key" parameter to the URL. That is what we'll condition against in the action as follows.

Conditional 1: [get_user] Not Empty
Conditional 2: [get_key] Not Equal To abc123

You'd then set a URL like index.php to redirect to. What this would do is redirect to home page if the key=abc123 is missing from the URL. You would then generate QR codes for the above URLs. I can't really help you with the QR code generation though as I've no experience with 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.
The following user(s) said Thank You: schrammelmann

Please Log in to join the conversation.

9 years 11 months ago - 9 years 11 months ago #245018 by schrammelmann
Hey, great, this could be the solution! So far I had CB Auto Actions not yet used. It really seems to be a very powerful tool.

I will create a field cb_key to fill this by Auto Actions with an individual key for each user.

For the specific member data such as real name, address, date of birth, etc., I think I'll create a separate tab. This will be the online membership card with its own look and maybe a background image.

The profile I will set to public access and by Auto Actions, I try to forbid public access without a valid key (like your example). Only with a valid key the special tab will be displayed and all other tabs will be hidden.

To generate the QR code I'll find a solution.

First of all I have to learn more about Auto Actions and substitutions.
If I figured out a solution, I will report here how it was implemented.

I'm a fan of you and your great work! Thank you very much!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

6 years 10 months ago - 6 years 10 months ago #294876 by schrammelmann
Replied by schrammelmann on topic Online ID card with QR Code and verification
A while ago, but I had done it then. :-)

Here is a brief description of my solution to create a
Online Identity Card / Membercard with possibility to verifyed by another person via QR code
printed out or showed on smartphones




Requirements
- Regular Labs - Sourcerer Plugin
- QR Code Elite Module for Joomla!
- CBSubs
- CBSubs SQL actions
- Privacy

Steps to create it
  1. create new tab for membercard; access=public, position=not on profile 1
  2. create new cb field cb_key for the secret key; type=text, tab=membercard, read only, show in profile=yes, show on profile edit=no
  3. create new cb field cb_link_to_membercard to show a link in own profile to the membercard; type=html; forced privacy mode=private; html content=[link with cb substitutions to membercard article]
  4. create further membercard fields or put existend fields to the new membercard tab (name, street ...)
  5. configure QR Module; module position=qrcode, qr code generation=page url
  6. configure CBSubs Plan to set secret key; add sql actions for plan activation and renewal to generate secret key and set it directly in cb user table via sql update statement.
  7. create a Joomla! article to show the membercard content -> via php code / Sourcerer Plugin;
    the code has to check the url get variables user and key if the are correct and correlate with the saved key in user profile by the CBSubs Plan SQL Action.
    If so, the cb:userposition position="not_on_profile_1" has to load and the QR Code Joomla! Position
    If not then the url request has to redirect to an error article / error page.
  8. create a Joomla! article for verfication fails; destination for the redirect from check in article 1
  9. create a Joomla! article for unauthorized access; destination for the redirect from check in article 1
  10. be sure to have a component template file, without menubar and so on, to show just the card data, nothing else

The membercard link in own profile looks like this in my case:
.../index.php/membercard?tmpl=component&user=62&key=YCc7Dedqucx5QWc9cy98eMe

Only with the correct url the membercard will be shown. Otherwise, an error message is displayed.
Via QR Code someone else can verfiy the data. If he see the same data of the card on his device the data are authentic.

If someone has more interest, I will gladly provide the code.

Michael
Attachments:
The following user(s) said Thank You: beat, boyjahq, krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn