• Payment Plugins Poll

    We need your feedback on the need for updated payment plugins. Please go here and give us your feedback.

  • Joomla 5.1

    For running J!5.1 you must install Fabrik 4.1
    See also Announcements

  • Subscription and download (Fabrik 4.1 for J!4.2+ and J!5.1) are working now

    See Announcement
    Please post subscription questions and issues here

    We have resolved the issue with the J! updater and this will be fixed in the next release.

  • Update & Changlog URL Fixer

    At the present time the update site URL for Fabrik is incorrect in all installations up to and including 4.1. This will be corrected in 4.2, however, if you wish to update Fabrik via the J! Updater you can download and install this plugin.

    This file is installed just like any other extension through the J! Extension Installation panel. It will not however actually install anything. Its sole purpose is to fix the Update Site and Changlog URL's. Once done it will simply exit.

    As always, we recommend you perform a site backup priot to installation.

SMS Code verification

sunnyjey

Active Member
Hi, I am planning to use Custom Joomla Fabrik Registration Form.

To enable the User Account, the User has to verify his entered Mobile number during Registration by sending some random code on User Mobile Number through SMS (Twillo) Gateway.

The first part of sending random code and SMS is pretty easy. I'm confused about the second part, where User enters the received SMS code in the Form Field and Fabrik verifies and enable User Account.

I'm sure, Fabrik users must have done this SMS verification for their website. Any pointer or help from members or developers.

Thanks in advance.
 
For verifying the code, I'd use some kind of hashing function for the "random" string which can be generated from information in the form. You'd have to use some imagination, but doing an MD5 of the email (maybe salting it with something else) and using however many characters of that you need (like 6) should be sufficient. That way, you don't need to store the code you generate. You can just regenerate the hash in the validation from the existing form data.

As for actually handling unblocking the account on verification ... I guess you'd need a form submission script to set the 'block' field depending on whether the code is correct.

-- hugh
 
For verifying the code, I'd use some kind of hashing function for the "random" string which can be generated from information in the form. You'd have to use some imagination, but doing an MD5 of the email (maybe salting it with something else) and using however many characters of that you need (like 6) should be sufficient. That way, you don't need to store the code you generate. You can just regenerate the hash in the validation from the existing form data.

I never thought about this. This definitely makes more sense. But beyond my capabilities. Thanks to you. I am using RowID + Fixed Number (Total 5 digit numeric code), though not professional and secure, but serves my purpose.

As for actually handling unblocking the account on verification ... I guess you'd need a form submission script to set the 'block' field depending on whether the code is correct.

I did that! Now everything is working as intended. BUT, discovered a new issue:

1. If I set Fabrik JUser Plugin Option 'Autologin' = NO, the Activated field in the J! Registration remains uncrossed (disable).

2. If I set Fabrik JUser Plugin Option 'Autologin' = YES, the Activated field in the J! Registration remains Checked (Enabled). I would naturally prefer to keep Autologin option YES. But, keeping this ON, the SMS authentication becomes irrelevant.

How do I update Autologin to 'Yes' through the 'form submission script' like what I did for 'Block' field ? Can we have one more user selectable drop-down field in Fabrik Juser Plugin for AutoLogin like other J! optional fields?
 
I never thought about this. This definitely makes more sense. But beyond my capabilities. Thanks to you. I am using RowID + Fixed Number (Total 5 digit numeric code), though not professional and secure, but serves my purpose.

It'd be something like ...

Code:
$code = substr(md5($formModel->formData['yourtable___email_raw']), 0, 5);

... which would be a hex string (so numbers, and letters from a to f).

How do I update Autologin to 'Yes' through the 'form submission script' like what I did for 'Block' field ? Can we have one more user selectable drop-down field in Fabrik Juser Plugin for AutoLogin like other J! optional fields?

If Autologin is set, then we override the block and activation settings, and just set them to 'false'.

We also only ever do autologin on initial creation of the account, not when editing an existing profile.

To do what I think you are trying to do, which is only do the autologin when they edit their profile to enter the SMS code, we'd need to modify the plugin. If you are interested in doing this, let me know and I'll give you a quote.

-- hugh
 
To do what I think you are trying to do, which is only do the autologin when they edit their profile to enter the SMS code, we'd need to modify the plugin. If you are interested in doing this, let me know and I'll give you a quote.

Yes! You are right. I am using New > Redirect Plugin > Edit > Save. SMS code is generated on NEW Form & validated on EDIT.

I'm still playing with User Registration. I have Payplans component from Stackideas, which handles User Registration / Membership on my site. I'm still figuring out how to bypass the Payplans for a particular group / Fabrik List, & use Fabrik as a User Registration which provides more flexibility and control on Action flow. Yes, please send a quote.
 
It'd probably be 2 or 3 hours work. One of those things I won't be able to give an exact estimate for till I start work on it and figure out the gotchas.

-- hugh
 
The option of having New > Redirect Plugin > Edit > Save with SMS code generation on NEW Form & validation on EDIT doesn't look that professional. The problem of having Edit / Redirect plugin is the display of all Fabrik parameters in the Redirect URL.

Is there any way to trigger SMS / EMail on failed Validation for NEW form to verify Mobile/Email of the user, maybe through Ajax ?

I want to make User Registration with Mobile / Email verification easy process for the Users.
 
As I said, this is something I'd have to look at, and figure out the best approach, which would very probably involve changes to the juser plugin. If you are interested in funding the work, let me know.

-- hugh
 
Back
Top