function sms_user_get_uid in SMS Framework 7
Same name and namespace in other branches
- 5 modules/sms_user/sms_user.module \sms_user_get_uid()
- 6.2 modules/sms_user/sms_user.module \sms_user_get_uid()
- 6 modules/sms_user/sms_user.module \sms_user_get_uid()
Returns the uid of the owner of a number.
Parameters
string $number: The phone number whose owner is sought.
int $status: The verification status of the number.
Return value
int The uid of the owner of the number.
8 calls to sms_user_get_uid()
- sms_action_match_user in modules/
sms_user/ sms_user.rules.inc - Rules action callback to match number to user.
- sms_action_opt_in in modules/
sms_user/ sms_user.rules.inc - Action Implementation: Uncheck SMS User the opt out checkbox.
- sms_action_opt_out in modules/
sms_user/ sms_user.rules.inc - Action Implementation: Check the SMS User opt out checkbox.
- sms_track_archive_write in modules/
sms_track/ sms_track.module - Writes a record to the DB table.
- sms_user_authenticate in modules/
sms_user/ sms_user.module - Authenticates a user based on mobile number.
File
- modules/
sms_user/ sms_user.module, line 129 - Provides integration between the SMS Framework and Drupal users.
Code
function sms_user_get_uid($number, $status = NULL) {
$query = db_select('sms_user', 'u')
->fields('u', array(
'uid',
))
->condition('number', $number);
if (isset($status)) {
$query
->condition('status', $status);
}
return $query
->execute()
->fetchField();
}