Skip to content

Instantly share code, notes, and snippets.

@FPCSJames
Last active February 22, 2023 22:24
Show Gist options
  • Save FPCSJames/b9169744e9786a32c0ed8754532428ba to your computer and use it in GitHub Desktop.
Save FPCSJames/b9169744e9786a32c0ed8754532428ba to your computer and use it in GitHub Desktop.
Disable the ManageWP one-click login feature.
<?php
/*
Plugin Name: Kill MWP Auto Login
Plugin URI: https://gist.github.com/FPCSJames/b9169744e9786a32c0ed8754532428ba
Description: Disable the ManageWP one-click login feature.
Author: Flashpoint Computer Services, LLC
Author URI: https://www.flashpointcs.net
License: GPL2
Network: true
*/
if(file_exists(untrailingslashit(WP_PLUGIN_DIR).'/worker/init.php') && isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'auto_login') !== false) {
wp_die('The ManageWP one-click login feature has been disabled.');
}
@FPCSJames
Copy link
Author

This should be added to the wp-content/mu-plugins folder. It must load before 0-worker.php, so the name matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment