You are here

function sms_user_get_number in SMS Framework 7

Returns a verified number of a given user

Parameters

object $account: The user account for which to get the number.

Return value

string|bool The user's verified number, or false if the user does not have access.

File

modules/sms_user/sms_user.module, line 105
Provides integration between the SMS Framework and Drupal users.

Code

function sms_user_get_number($account) {

  // Check if the user is enabled to receive SMS.
  if (user_access('receive sms', $account)) {
    if ($account->sms_user['status'] >= SMS_USER_CONFIRMED) {
      return $account->sms_user['number'];
    }
    else {
      return FALSE;
    }
  }
  return FALSE;
}