. * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /// Class Reminder_User /// @since 0.83 class Reminder_User extends CommonDBRelation { // From CommonDBRelation static public $itemtype_1 = 'Reminder'; static public $items_id_1 = 'reminders_id'; static public $itemtype_2 = 'User'; static public $items_id_2 = 'users_id'; static public $checkItem_2_Rights = self::DONT_CHECK_ITEM_RIGHTS; static public $logs_for_item_2 = false; /** * Get users for a reminder * * @param $reminders_id ID of the reminder * * @return array of users linked to a reminder **/ static function getUsers($reminders_id) { global $DB; $users = []; $iterator = $DB->request([ 'FROM' => self::getTable(), 'WHERE' => [ 'reminders_id' => $reminders_id ] ]); while ($data = $iterator->next()) { $users[$data['users_id']][] = $data; } return $users; } }