How to get the Mobile phone number ?

Events happening in the community are now at Drupal community events on www.drupal.org.
ai.30x's picture

How to display the phone number has been verified in views,

I need to create a list of all user phone number,

I encountered a problem for how to get the user mobile phone number.

Please help me ,thank you!

SMS 6.x-1.0

Comments

SMS User?

skram's picture

The phone numbers they put into their profile (which uses the sms_user module)?

If so, it's easiest for you to just look at your SQL database. Each user will have a row/record in thesms_user database table.

If that doesnt work, you can write some PHP code and put it in the SMS_User admin page, but that seems superfluous, no?

thanks

ai.30x's picture

I can see number in SQL database,

But I hope used in the views module, for example: a number field.

As will be more simple to use,more general.

Please help those who give patch or new sub-module.

Please...for me ,for all SMS module user

====================================================================
Using the symbols interpretation of the real, using the model interpretation of the truth.

What are you trying to do

skram's picture

What are you trying to do with the list of phone numbers? Knowing that, someone can maybe write a patch for your specific use.

To manage and statistics, For

ai.30x's picture

To manage and statistics,

For example,a specific role users can listed some of the user's mobile phone number.

I use views custom field module, but I do not know get user's mobile phone number,

please give me the php code for views custom field module.

====================================================================
Using the symbols interpretation of the real, using the model interpretation of the truth.

Your PHP code for the custom

skram's picture

Your PHP code for the custom view would be something along the lines of:

<?php
  $users_result
= db_query("SELECT number FROM sms_user WHERE status = 2");
 
$users = array();
  while (
$row = db_fetch_array($users_result)) { $users[] = $row; }

  foreach (
$users as $user) {
   print
$user['number'];
  }
?>

You should look at the sms_blast.module code. You seem to be trying to do the same thing - or at least gather the same data.

Cheers,

Mark S. / @Skram
http://marksilver.net/linkedin

thank you, but some problems

ai.30x's picture

Thank you for your help,but your code show all mobile numbers.

I hope in user views display fields arranged like the following:

registration time

username

uid

number

====================================================================
Using the symbols interpretation of the real, using the model interpretation of the truth.

views integration

batje's picture

much of what you need is in this patch:

http://drupal.org/node/674896

Thank you for your help, my

ai.30x's picture

Thank you for your help, my problem was solved!

Thank you ! !

====================================================================
Using the symbols interpretation of the real, using the model interpretation of the truth.

SMS Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: