• Resolved PhilEvans62

    (@philevans62)


    Hi,

    Is it possible to use WP Bulk Delete to delete users based on last login date. For example, delete all users of user type X who have not logged in for 365 days or more.

    Thanks

    Phil

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Rajat Patel

    (@rajat1192)

    Hello @philevans62 ,

    Thanks for reaching out to us,

    Yes, you can delete users by the last login date, you can delete users by following the details below.

    ==> Activate this( JSM Show User Metadata ) plugin and get the user’s last login meta key. And check the date format
    ==> Once done, you can select the user role,
    ==> Add the user meta key and value.
    ==> Set limit field
    ==> Press the “Delete Users” button.

    Also, by default WordPress use the “_last_login” this user meta key.

    Please get in touch with us here if you have any more questions for quick reply.

    Thread Starter PhilEvans62

    (@philevans62)

    Thanks Rajat.

    We already have last login date showing in the user list which I think is added by Usersinsights, but I’ll need to check.

    Plugin Contributor Rajat Patel

    (@rajat1192)

    Hello @philevans62 ,

    Sure, let us know if you have any questions or any doubts, we are here to help you.

    Thread Starter PhilEvans62

    (@philevans62)

    Hi,

    I finally got around to looking into this. The last login date looks to be coming from Wordfence. Is there a way we can hook into that to bulk delete users based on last login? i.e. delete all users with last login is 365 days or more?

    Thanks

    Phil

    Plugin Contributor Rajat Patel

    (@rajat1192)

    Hello @philevans62,

    Yes, you can delete the last login user older than 365 days as per Wordfence data by following the instructions below.

    Meta Key = “wfls-last-login”
    Option = less than ( number )
    Meta Value = “1697414400” ( It’s Unix timestamp value ) 16-10-2023

    Note: Please take a database backup before deleting anything.

    Thread Starter PhilEvans62

    (@philevans62)

    Hi Rajat,

    I’ve just upgraded to your Pro version and tried running this on a staging version, but I keep getting
    Nothing to delete!!

    Also, is there a way to delete deleted user data at the same time as we don’t want to assign it to other users.

    Plugin Contributor Rajat Patel

    (@rajat1192)

    Hello @philevans62 ,

    Could you please contact us here for quick and pro support?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.