You are here

function message_plugin_flag_accessible_ids in Message 6

Get all the flaggings a user did in a certain flag.

1 call to message_plugin_flag_accessible_ids()
message_handler_filter_realm_user_access_flag::query in includes/message_handler_filter_realm_user_access_flag.inc

File

plugins/message/message_plugin_flag.inc, line 16

Code

function message_plugin_flag_accessible_ids($account, $flag_name) {
  $access = array();
  if ($flag = flag_get_flag($flag_name)) {

    // Get all the flaggings of the user in the flag.
    if (($flaggings = flag_get_user_flags($flag->content_type, NULL, $account->uid)) && !empty($flaggings[$flag_name])) {
      $access = array_keys($flaggings[$flag_name]);
    }
  }
  return $access;
}