You are here

function messaging_sms_user_destination in Messaging 6.2

Same name and namespace in other branches
  1. 6.4 messaging_sms/messaging_sms.module \messaging_sms_user_destination()
  2. 6 messaging_sms/messaging_sms.module \messaging_sms_user_destination()
  3. 6.3 messaging_sms/messaging_sms.module \messaging_sms_user_destination()

Map user account to SMS destination (phone number)

1 string reference to 'messaging_sms_user_destination'
messaging_sms_messaging in messaging_sms/messaging_sms.module
Implementation of hook_messaging

File

messaging_sms/messaging_sms.module, line 44
SMS Messsaging using SMS Framework. Messaging method plug-in

Code

function messaging_sms_user_destination($account, $message) {

  // Check for active mobile infomation. Simply return it so that the send
  // callback has a destination array and access everything.
  if (!empty($account->sms_user) && $account->sms_user[0]['status'] == 2 && !empty($account->sms_user[0]['number'])) {
    return $account->sms_user[0]['number'];
  }
}