i used Sms Framework send sms to user if someone comment on their nodes system run ok, no problem. And also i create new cck field for users phone, when user goes their account they able to add or update this field. My question is how should i control if this telephone number belongs to user. How can i verificate this.


You can follow verification message method. When a user add/updates a phone number, you can send a unique random number which he must enter to verify his phone number.

Create a table that will contain three columns phone-number, unix time stamp and the verfication-code. When a user adds a phone number, create and store the random number. When the user inputs the verfication-code(random number), look it up in the database and then authenticate the user. Once he is authenticated, you can remove the entry from the database.

If you mention that verification code is valid only for 5 mins, then you can run a cron job to clear the database entries which are older than 5 mins.

  • 1
    thanks for your answer but i cant think how this. User is authenticate now in registration i can't ask phone on register. When they click profile after login there's field phone if they want then enter a phone or live blank. if they enter a phone then some trigger event i want to do
    – turkaze
    Dec 21 '12 at 20:30
  • You can use drupalcontrib.org/api/drupal/… or drupalcontrib.org/api/drupal/… hooks to see if the phone field is entered or not, then check if it is verified or not and then send the verefication code based on that.
    – Gokul N K
    Dec 24 '12 at 10:58
  • thanks for comment. i use now sms_user and smsframework module there is also send code in sms_user module.I give permission to others use this module no problem Verificate mobile number is Run OK. Now i should use rules module and make action to send users sms about when someone add comment to this user post. But sms_user mobile field isn't a user field so When users mobile number verification is ok i want do take sms_user mobile field value and insert in it user manage fields to user mobile field.
    – turkaze
    Dec 24 '12 at 19:15
  • How can i do this,thanks because in rules add action send sms i should give the data selector autor:field:user_mobile_number but my verificate number in sms_users modules mobile field.
    – turkaze
    Dec 24 '12 at 19:17
  • Okay thanks i solve my question the method of my last comment.
    – turkaze
    Dec 25 '12 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.