function messaging_method_default in Messaging 6
Same name and namespace in other branches
- 5 messaging.module \messaging_method_default()
- 6.4 messaging.module \messaging_method_default()
- 6.2 messaging.module \messaging_method_default()
- 6.3 messaging.module \messaging_method_default()
- 7 messaging.module \messaging_method_default()
Returns default messaging method
7 calls to messaging_method_default()
- Messaging_API_Tests::testMessagingSendingAPI in tests/
messaging_api.test - Play with creating, retrieving, deleting a pair messages
- messaging_debug_post_form in messaging_debug/
messaging_debug.module - Incoming message form
- messaging_message_send in ./
messaging.module - Send message to array of destinations. The message is rendered just once.
- messaging_message_send_user in ./
messaging.module - Send message to user represented by account
- messaging_update_method_disable in ./
messaging.install - Disable a sending method and return an alternative one
File
- ./
messaging.module, line 498
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());
}
}