XF 2.2 Searching Change Log on Edited By ...

Steve Freides

Active member
I want to look at all members of two groups on my forum whose membership was not granted by me. I know in the Change Log for each user, I can see "Edited By ..." and my name, but I cannot figure out a way to search based on who made a change. And what I really want to know is something like, when the Old Value and New Value are compared, one of the groups I'm interested in shows up as being in New Value but not in Old Value.

Ex-programmer that I am, if I had database access and an understanding of the way the tables are joined, I'd write an SQL statement to find what I want, but I have neither the access nor the understanding of how the database is structured.

Custom programming required? We have a developer, I'm just want to know if there is a way I could do this on my own, even if it meant having our developer export the Change Log for our installation to me as a text file and then I could work on parsing it. 2k+ entries. Ours goes back to March, 2018, which is when we decided to keep it longer than the default, if memory serves.

v2.2.7 Patch 1

Thanks in advance for your replies.

-S-
 
You could do it fairly simply via SQL. Something like:

SQL:
SELECT content_id AS user_id,
    edit_date,
    edit_user_id,
    old_value AS old_groups,
    new_value AS new_groups
FROM xf_change_log
WHERE content_type = 'user'
    AND edit_user_id <> {yourUserId}
    AND field = 'secondary_group_ids'
    AND (
        FIND_IN_SET({groupId}, old_value) OR
        FIND_IN_SET({groupId}, new_value)
    )
ORDER BY edit_date ASC, edit_user_id ASC

(replacing {yourUserId} and {groupId} as appropriate)
 
Back
Top Bottom