Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing feature to allow disabling users accounts #69

Closed
wants to merge 1 commit into from

Conversation

nicholasio
Copy link
Member

@nicholasio nicholasio commented May 17, 2020

Description of the Change

Introduces a new functionality in the plugin to let admins disable users and to automatically (opt-in) disable inactive users.

Alternate Designs

Benefits

  1. Many sites would have "fake users" just for the sake of author attributions, this is generally a bad practice as those unused users add a new vector of attack to the site. Disabling these users' account would be an easy way to reduce the risks.
  2. Some sites have a lot of users and companies often don't have controls over its wp users, automatically disabling users who haven't logged in to the site after a given number of days mitigates the risk of keeping old unused accounts active. Automatically disabling users is an opt-in feature. By default, it is only enabled for 10up accounts.

Possible Drawbacks

This requires a new meta field to track last login dates. Therefore after installing the plugin, the inactivity threshold will only start to count after the user logs in after the plugin was enabled.

As an alternative, I've also added a wp-cli command to set the last login meta to all users
wp 10up-experience users set_last_login

Verification Process

This still needs more testing. But overall it's working great on my initial tests.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

@nicholasio nicholasio changed the title Introducing feature to automatically disable inactive users Introducing feature to allow disable users accounts May 17, 2020
@nicholasio
Copy link
Member Author

@tylercherpak @tlovett1 I had most of this code already written, let me know what you think and if it's worth adding this to 10up experience.

@nicholasio nicholasio changed the title Introducing feature to allow disable users accounts Introducing feature to allow disabling users accounts May 17, 2020
@jeffpaul jeffpaul added this to the 1.8.0 milestone Aug 26, 2020
@jeffpaul jeffpaul modified the milestones: 1.8.0, 1.9.0 Dec 9, 2020
@tlovett1
Copy link
Member

tlovett1 commented Jan 5, 2022

Closing in favor of #95 for now

@tlovett1 tlovett1 closed this Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants