Closed PatrickPedersen closed 6 months ago
@PatrickPedersen I think this could be a simple extra order by clause in the sql query... can you confirm if the right field to identify inactive accounts would be xf.useruser_state == 'disabled'
? Or should we order by forum last_activity instead?
If last_activity is the case then I think the following should work:
SELECT *, IF(last_activity >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR), 1, 0) as activity_filter FROM bwcsvr_xenforo.xf_user ORDER BY activity_filter DESC, username ASC
user_state == 'disabled' would mean their forum user is disabled and not discharged. So that won't work.
If last_activity is the case then I think the following should work: SELECT *, IF(last_activity >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR), 1, 0) as activity_filter FROM bwcsvr_xenforo.xf_user ORDER BY activity_filter DESC, username ASC
I like this. Should help a lot in finding people.
Deployed
I would also like to ask if it is possible to remove inactive members from the member list. I know I have seen a few people on the members list that have not been around for at least a year.
The best idea here, would probably be to move all inactive members to the bottom of the list instead of removing them.