• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

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
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top