From 520ffdf368bee84549a0b284bd2df4da1d633a8f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 9 Nov 2012 12:47:50 +0100 Subject: [PATCH] [ticket/10897] Make sure the user we're fetching is a bot. PHPBB3-10897 --- phpBB/install/database_update.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 154fc313a0..bd12a90288 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2132,8 +2132,9 @@ function change_database_data(&$no_updates, $version) foreach ($bots_to_update as $bot_name => $bot_agent) { $sql = 'SELECT user_id - FROM ' . USERS_TABLE . " - WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; + FROM ' . USERS_TABLE . ' + WHERE user_type = ' . USER_IGNORE . " + AND username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; $result = $db->sql_query($sql); $bot_user_id = (int) $db->sql_fetchfield('user_id'); $db->sql_freeresult($result);