You are here

function messaging_method_list in Messaging 6

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

List sending methods

Parameters

$account: Optional user account, for checking permissions against this account

8 calls to messaging_method_list()
messaging_admin_message_form in ./messaging.admin.inc
Edit message formats
messaging_admin_settings in ./messaging.admin.inc
Admin settings form
messaging_admin_template in ./messaging.admin.inc
messaging_debug_post_form in messaging_debug/messaging_debug.module
Incoming message form
messaging_notify_admin_settings in messaging_notify/messaging_notify.module
Admin settings, configure defaults for sending methods

... See full list

File

./messaging.module, line 462

Code

function messaging_method_list($account = NULL) {
  $info = messaging_method_info(NULL, 'name');
  if ($account) {
    foreach (array_keys($info) as $method) {

      // Check access for each method and check destination
      if (!messaging_method_permission($method, $account) || !messaging_user_destination($account, $method)) {
        unset($info[$method]);
      }
    }
  }
  return $info;
}