Skip to content

saintsystems/disable-user-login

Repository files navigation

Disable User Login

Build Status WordPress tested WordPress Plugin version WordPress Plugin Downloads WordPress Plugin Active Installs WordPress Plugin Rating License

Disable User Login provides the ability to disable user accounts and prevent them from logging in.

This plugin gives you the ability to disable specific user accounts via a profile setting.

Once installed and activated, a checkbox appears on the user profile settings (only for admins). When checked, the user's account will be disabled and they will be unable to login with the account. If they try to login, they are instantly logged out and redirected to the login page with a message that notifies them their account is disabled.

This can be useful in a few situations.

  • You want freelance writers to still show up in the authors box, but you don't want them to be able to login.
  • You have former employees who have authored posts and you don't want to delete them or reassign their posts to other users, but still need them to show up in the "Authors box."
  • You are working on a site for a client who has an account, but do not want him to login and/or make changes during development.
  • You have a client who has an unpaid invoice.

Installation

Here's a guide on how to install the plugin on your WordPress site. If you want to run the latest development version, you have two options:

This will download the latest development version of the Disable User Login plugin. While this version is usually stable, it is not recommended for use in a production environment.

Customize Disabled User Message

You can customize the message users see when their accounts are disabled by hooking into the disable_user_login.disabled_message hook exposed by the plugin or by providing a translation in your languages file.

    add_filter( 'disable_user_login.disabled_message', function( $disabled_message ) {
       // Defaults to: __( '<strong>ERROR</strong>: Account disabled.', 'disable-user-login' )
       $disabled_message = '<strong>ERROR</strong>: Get outta here!';
       
       return $disabled_message;
    }, 10, 1 );

Bugs

If you think you've found a bug, please raise an issue here.

Documentation & Support

This is a developer's portal for the Disable User Login plugin and should not be used for support. Please visit the Disable User Login support forum on WordPress.org for basic support and help from other users. Since this is a free plugin, we respond to these as we have time.

Online documentation and code samples are available via our Help Center.

Priority support is available for Disable User Login Pro customers.

Contributions

Anyone is welcome to contribute to the plugin. There are various ways you can contribute:

Credits