diff options
author | 3Di <three3di@hotmail.it> | 2018-12-24 09:42:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 09:42:16 +0100 |
commit | 871875d9aa3d0b0a17a0eb1936323d5737a438f5 (patch) | |
tree | d035cb1e7c7d99fedd70976c47cf9d7d8a04c7ac /phpBB/includes/functions_user.php | |
parent | db7f4d4c9523e5dc36c62ec6fe647aaf7708daaa (diff) | |
parent | ca98cd413a6f01eb01e3ca60cea9b55409dadc61 (diff) | |
download | forums-871875d9aa3d0b0a17a0eb1936323d5737a438f5.tar forums-871875d9aa3d0b0a17a0eb1936323d5737a438f5.tar.gz forums-871875d9aa3d0b0a17a0eb1936323d5737a438f5.tar.bz2 forums-871875d9aa3d0b0a17a0eb1936323d5737a438f5.tar.xz forums-871875d9aa3d0b0a17a0eb1936323d5737a438f5.zip |
Merge pull request #1 from phpbb/3.2.x
3.2.x
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index d019b867fa..26bb987561 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -666,8 +666,29 @@ function user_delete($mode, $user_ids, $retain_username = true) delete_posts('poster_id', $user_ids); } - $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE, $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), $phpbb_container->getParameter('tables.auth_provider_oauth_states'), $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc')); - + $table_ary = [ + USERS_TABLE, + USER_GROUP_TABLE, + TOPICS_WATCH_TABLE, + FORUMS_WATCH_TABLE, + ACL_USERS_TABLE, + TOPICS_TRACK_TABLE, + TOPICS_POSTED_TABLE, + FORUMS_TRACK_TABLE, + PROFILE_FIELDS_DATA_TABLE, + MODERATOR_CACHE_TABLE, + DRAFTS_TABLE, + BOOKMARKS_TABLE, + SESSIONS_KEYS_TABLE, + PRIVMSGS_FOLDER_TABLE, + PRIVMSGS_RULES_TABLE, + $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), + $phpbb_container->getParameter('tables.auth_provider_oauth_states'), + $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc') + ]; + + // Ignore errors on deleting from non-existent tables, e.g. when migrating + $db->sql_return_on_error(true); // Delete the miscellaneous (non-post) data for the user foreach ($table_ary as $table) { @@ -675,6 +696,7 @@ function user_delete($mode, $user_ids, $retain_username = true) WHERE " . $user_id_sql; $db->sql_query($sql); } + $db->sql_return_on_error(); $cache->destroy('sql', MODERATOR_CACHE_TABLE); |