1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

[ticket/11453] Improve performance of notification.method.messenger_base

PHPBB3-11453
This commit is contained in:
Jakub Senko
2018-07-26 15:42:44 +02:00
parent 911c46cc61
commit 76982b430f
2 changed files with 6 additions and 4 deletions

View File

@@ -64,8 +64,9 @@ class user_loader
* Load user helper
*
* @param array $user_ids
* @param array $ignore_types user types to ignore
*/
public function load_users(array $user_ids)
public function load_users(array $user_ids, array $ignore_types = array())
{
$user_ids[] = ANONYMOUS;
@@ -79,7 +80,8 @@ class user_loader
{
$sql = 'SELECT *
FROM ' . $this->users_table . '
WHERE ' . $this->db->sql_in_set('user_id', $user_ids);
WHERE ' . $this->db->sql_in_set('user_id', $user_ids) . '
AND ' . $this->db->sql_in_set('user_type', $ignore_types, true, true);
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))