You are here

function messaging_method_default in Messaging 6.4

Same name and namespace in other branches
  1. 5 messaging.module \messaging_method_default()
  2. 6 messaging.module \messaging_method_default()
  3. 6.2 messaging.module \messaging_method_default()
  4. 6.3 messaging.module \messaging_method_default()
  5. 7 messaging.module \messaging_method_default()

Returns default messaging method

7 calls to messaging_method_default()
messaging_account_build_destination in ./messaging.module
Build destination object from user account (and create destination if not exists)
messaging_admin_test_post_form in ./messaging.admin.inc
Incoming message form
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Exercise basic API functions
Messaging_Message::set_destination in includes/messaging_message.class.inc
Set destination object or figure out a destination if not set
messaging_update_method_disable in ./messaging.install
Disable a sending method and return an alternative one

... See full list

File

./messaging.module, line 439

Code

function messaging_method_default($account = NULL) {
  if ($account && !empty($account->messaging_default) && messaging_method_permission($account->messaging_default, $account)) {
    return $account->messaging_default;
  }
  elseif ($method = variable_get('messaging_default_method', '')) {
    return $method;
  }
  else {
    return key(messaging_method_info());
  }
}