mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10897] Make sure the user we're fetching is a bot.
PHPBB3-10897
This commit is contained in:
parent
c054757f3c
commit
520ffdf368
1 changed files with 3 additions and 2 deletions
|
@ -2132,8 +2132,9 @@ function change_database_data(&$no_updates, $version)
|
||||||
foreach ($bots_to_update as $bot_name => $bot_agent)
|
foreach ($bots_to_update as $bot_name => $bot_agent)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT user_id
|
$sql = 'SELECT user_id
|
||||||
FROM ' . USERS_TABLE . "
|
FROM ' . USERS_TABLE . '
|
||||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'";
|
WHERE user_type = ' . USER_IGNORE . "
|
||||||
|
AND username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$bot_user_id = (int) $db->sql_fetchfield('user_id');
|
$bot_user_id = (int) $db->sql_fetchfield('user_id');
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue