PluginProbe
Authorizer / 2.6.7
Authorizer v2.6.7
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / uninstall.php

uninstall.php in Authorizer 2.6.7, at uninstall.php

35 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if uninstall not called from WordPress.
4 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5 exit();
6 }
7
8 // Delete options in database.
9 delete_option( 'auth_settings' );
10 delete_option( 'auth_settings_recently_sent_emails' );
11 delete_option( 'auth_settings_advanced_admin_notice' );
12 delete_option( 'auth_settings_advanced_login_error' );
13 delete_option( 'auth_settings_advanced_lockouts_time_last_failed' );
14 delete_option( 'auth_settings_advanced_lockouts_failed_attempts' );
15
16 // Delete multisite options
17 if ( is_multisite() ) {
18 delete_blog_option( BLOG_ID_CURRENT_SITE, 'auth_multisite_settings' );
19 }
20
21 // For security, delete blocked users (since we can't enforce their blocked
22 // status without this plugin enabled, which means they would be able to reset
23 // their passwords and log in). If they have any content, reassign it to the
24 // current user (the user uninstalling the plugin).
25 if ( ! is_multisite() ) {
26 $blocked_users = get_users( array(
27 'meta_key' => 'auth_blocked',
28 'meta_value' => 'yes',
29 ));
30 $current_user = wp_get_current_user();
31 foreach ( $blocked_users as $blocked_user ) {
32 wp_delete_user( $blocked_user->ID, $current_user->ID );
33 }
34 }
35