function engagements_get_user_notify_sms_receipt_values

7.x engagements.module engagements_get_user_notify_sms_receipt_values($user_id = NULL)
6.x engagements.module engagements_get_user_notify_sms_receipt_values($user_id = NULL)

Get an array of numbers which the user should be notified of when they receive an SMS.

3 calls to engagements_get_user_notify_sms_receipt_values()
engagements_display_advisee_engagements_page in modules/engagements/engagements.module
engagements_get_alert_count_by_type in modules/engagements/engagements.module
Implements hook_get_count_for_alert_type
user_edit_user_form in modules/user/user.module
Let the user edit a user's roles and other information.

File

modules/engagements/engagements.module, line 2970
This is the primary module file for the engagements module.

Code

function engagements_get_user_notify_sms_receipt_values($user_id = NULL) {
  global $user;

  $rtn = array();

  if ($user_id === NULL) {
    $user_id = $user->id;
  }
  $options = engagements_get_from_phones_for_fapi(TRUE);

  foreach ($options as $num => $val) {
    $test = user_get_setting($user_id, "notify_sms_receipt__" . $num);
    if (intval($test) === intval($num)) {
      $rtn [$num] = $num;
    }
  }
  return $rtn;
}