コード例 #1
0
 /**
  * Get a list of users that are authorised to receive notifications
  *
  * @param array $users Array of users that have subscribed to a notification
  * @param int $forum_id Forum ID of the forum
  * @param array $options Array of notification options
  * @param bool $sort Whether the users array should be sorted. Default: false
  * @return array Array of users that are authorised recipients
  */
 protected function get_authorised_recipients($users, $forum_id, $options, $sort = false)
 {
     if (empty($users)) {
         return array();
     }
     $users = array_unique($users);
     if ($sort) {
         sort($users);
     }
     $auth_read = $this->auth->acl_get_list($users, 'f_read', $forum_id);
     if (empty($auth_read)) {
         return array();
     }
     return $this->check_user_notification_options($auth_read[$forum_id]['f_read'], $options);
 }