mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12742] Add method for getting authenticated recipients
PHPBB3-12742
This commit is contained in:
parent
44a0f43062
commit
80788980aa
1 changed files with 23 additions and 0 deletions
|
@ -533,4 +533,27 @@ abstract class base implements \phpbb\notification\type\type_interface
|
||||||
WHERE ' . $where;
|
WHERE ' . $where;
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of users that are authenticated 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
|
||||||
|
* @return array Array of users that are authenticated recipients
|
||||||
|
*/
|
||||||
|
protected function get_authenticated_recipients($users, $forum_id, $options)
|
||||||
|
{
|
||||||
|
$users = array_unique($users);
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue