Improving SMS Double Opt-In Process with SMS Framework
Usability, Customization Options, and Data Storage Improvements have been Committed

We’ve been improving the usability, customization options, and data storage architecture of the “SMS User module,” (which is included as part of the SMS Framework). The module allows your Drupal site to store mobile information for users that can then be used by other modules. To ensure that a user actually owns a number we use a double opt-in process where a confirmation message is sent to the handset with a four digit code. The user is then asked to enter this code to confirm ownership. Here is a screencast showing how this works.

As you can see, site administrators can now customize the text of the confirmation message using the token module. So if Obama was using Drupal to run his awesome SMS campaign, he could now have a confirmation message look like “Together we can bring change. Confirm your number at [mobile-url] with the code [confirm-code] to get locally targeted messages.”

Here are the two options hooks into the token module:

  • [confirm-code] The mobile confirmation code for the user.
  • [mobile-url] The URL for the user’s mobile settings page.

Here is a screenshot showing each step so you can see the new work done.

I’ve made some significant improvements and added new features, all of which help the module get towards a 1.0 release. One improvement is the data storage method in the module. Previously, a user’s mobile information was stored in the “data” column of the users table. This made identifying a user based on their mobile number very inefficient. User mobile data is now stored in a separate table. This table’s structure will scale to allow multiple numbers per user (although no interface is built for this yet).

I will post more next week as we move closer to a 1.0 release of SMS Framework. Also I hope to share some new ideas on making the “mobile-url” work more like tinyURL.

3 Comments
Why do you have to select a carrier?

Maybe a daft question, but why do you have to specify the carrier? Is this a North America thing?

In the UK, I would expect to just put the mobile phone number.

Numbers here can be 'ported' so it might be with BT one month and Vodaphone the next, but an SMS would still get through.

... or have I got the wrong end of the stick?

Thanks for this great work!

Carrier field optional

The user is prompted for a carrier in this case because the site is set up to use the E-mail gateway module. Drupal needs to know the carrier in order to send the message to that network's gateway. It is not required in other cases.

The Clickatell gateway module, for example, does not require it because the Clickatell service routes differently.

Ooooh!

Oh, that's a wonderful module!