function messaging_method_default in Messaging 7
Same name and namespace in other branches
- 5 messaging.module \messaging_method_default()
- 6.4 messaging.module \messaging_method_default()
- 6 messaging.module \messaging_method_default()
- 6.2 messaging.module \messaging_method_default()
- 6.3 messaging.module \messaging_method_default()
Returns default messaging method
5 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_update_method_disable in ./
messaging.install - Disable a sending method and return an alternative one
- messaging_update_method_replace in ./
messaging.install - Find a suitable replacement for a sending method
File
- ./
messaging.module, line 369
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());
}
}