Page MenuHomePhabricator

Abuse logs not moved under the new username after user renaming
Closed, DuplicatePublic


If an user (whose username is "A", for instance) triggers one of the abuse filters when making edits at a mediawiki-based site, the edit will be logged at /Special:Abuselog?wpSearchUser=A . However, if A is renamed to B, /Special:Abuselog?wpSearchUser=B no longer lists his edits that was done before renaming and triggered filters. This is definitely not expected. Actually, other kinds of logged actions (deletion log, block log, etc) will be moved under the new username after a successful user renaming.

1 A user named "Antigng-test" triggered the filter
2 "Antigng-test" was renamed to "Antigng-test1"
3 The logged action is not moved under the new username "Antigng-test1"

(mediawiki 1.30.0)

This is because the showlist() function uses both "afl_user" and "afl_user_text" as query conditions. Before the user's renaming, parameters for both "afl_user" and "afl_user_text" refer to the same user. The renaming process, however, changes "user_name" in the user table while leaves the abuse_filter_log table unchanged. Thus edits triggered the filter before the renaming is not visible from Special:Abuselog .

In order to fix this problem, we should either use "afl_user" alone in queries , or change the abuse_filter_log table during the renaming.