1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-16 20:39:49 +02:00
2021-05-14 21:51:54 +02:00

36 lines
881 B
PHP

<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\mention\source;
class user extends base_user
{
/**
* {@inheritdoc}
*/
protected function query($keyword, $topic_id)
{
$query = $this->db->sql_build_query('SELECT', [
'SELECT' => 'u.username, u.user_id',
'FROM' => [
USERS_TABLE => 'u',
],
'WHERE' => 'u.user_id <> ' . ANONYMOUS . '
AND ' . $this->db->sql_in_set('u.user_type', [USER_NORMAL, USER_FOUNDER]) . '
AND u.username_clean ' . $this->db->sql_like_expression($keyword . $this->db->get_any_char()),
'ORDER_BY' => 'u.user_lastvisit DESC'
]);
return $query;
}
}