Membership - Purge Users who have not been active in the past 60 days.

Hello -

On our site, we have a free subscription level, and we want to purge these "free" members who have not been active on the site for 60 days or more.

I'm familiar with the "Last_activity" field in the WordPress usermeta table, but I haven't figured out how to effectively use that information to purge the associated user when the user has not been active for a specific amount of time, or since a given date.

I wouldn't want to accomplish this with a live function in my child theme, because we should review the usernames prior to purging their accounts.

Does anyone have any ideas how to accomplish this?

1. Identify users who have been inactive for 60 days or more, or in respect to a reference date.

2. Review that list of inactive users.

3. Purge the list of inactive users with the ability to exclude any users that we wish to exclude.

I'm not necessarily looking for a fully automated method. If it were to take a few steps, that would be ok.

Thanks for any help or insight!