Changeset 1470381
- Timestamp:
- 08/08/2016 11:29:36 PM (10 years ago)
- Location:
- user-activation-keys/trunk
- Files:
-
- 2 edited
-
ds_wp3_user_activation_keys.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
user-activation-keys/trunk/ds_wp3_user_activation_keys.php
r975629 r1470381 5 5 Description: WP Network Multisite user activation key removal or approval Network Plugin. See Network-->Users->"User Activation Keys" to delete activation keys - to allow immediate (re)signup of users who otherwise get the "try again in two days" message. Also, users waiting to be activated (or can't because the email with the generated activation link is "gone") can be approved manually. 6 6 Author: D. Sader 7 Version: 3.5.27 Version: 4.6 8 8 Author URI: http://dsader.snowotherway.org 9 9 Network: true … … 20 20 21 21 */ 22 class ds_user_activation_keys {22 class DS_User_Activation_Keys { 23 23 24 function ds_user_activation_keys() {25 add_action('network_admin_menu', array( &$this, 'ds_uak_admin_page'));24 function __construct() { 25 add_action('network_admin_menu', array($this, 'ds_uak_admin_page')); 26 26 } 27 27 28 28 function ds_uak_admin_page() { 29 add_submenu_page('users.php', 'User Activation Keys', 'User Activation Keys', 'edit_users', 'act_keys', array( &$this, 'ds_delete_stale'));29 add_submenu_page('users.php', 'User Activation Keys', 'User Activation Keys', 'edit_users', 'act_keys', array($this, 'ds_delete_stale')); 30 30 } 31 31 … … 37 37 $delete = $_GET['delete']; 38 38 } 39 /* if(isset($_GET['del_stale_active'])) { 40 $del_stale_active = $_GET['del_stale_active']; 41 } 42 if(isset($_GET['del_stale_inactive'])) { 43 $del_stale_inactive = $_GET['del_stale_inactive']; 44 } 45 */ 39 46 40 $location = network_admin_url('users.php?page=act_keys'); 47 41 48 42 if ( !empty($delete) ) { 49 43 check_admin_referer('activation_key'); 50 // $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->signups WHERE activation_key = %d",$delete));51 44 $wpdb->delete( $wpdb->signups, array( 'activation_key' => $delete ) ); 52 45 echo '<meta http-equiv="refresh" content="0;url='.$location.'" />'; 53 46 exit; 54 47 } 55 /* if ( '1' == $del_stale_active ) { 56 check_admin_referer('activation_key'); 57 $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->signups WHERE active = %d AND DATE(registered) < DATE_SUB(CURDATE(), INTERVAL %s DAY)",1,30)); 58 echo '<meta http-equiv="refresh" content="0;url='.$location.'" />'; 59 exit; 60 } 61 if ( '1' == $del_stale_inactive ) { 62 check_admin_referer('activation_key'); 63 $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->signups WHERE active = %d AND DATE(registered) < DATE_SUB(CURDATE(), INTERVAL %s DAY)",0,30)); 64 echo '<meta http-equiv="refresh" content="0;url='.$location.'" />'; 65 exit; 66 } 67 */ 48 68 49 echo '<div class="wrap">'; 69 50 echo "<h2>User Activation Keys</h2>"; … … 71 52 echo '<p>The following is a list of user activation keys from $wpdb->signups. Delete a key to allow the username to (re)signup and bypass the "couple days" it takes WP to free up its hold on a user name. You can also manually approve users that for whatever reason have not completed their activation.</p>'; 72 53 73 /* echo '<div class="tablenav"> <span class="alignleft">';74 echo '<a class="button-secondary" href="' . wp_nonce_url( $location . '&del_stale_active=1', 'activation_key' ) . '" class="delete">'.__('Delete stale active signup keys older than 30 days').'</a>';75 echo '<a class="button-secondary" href="' . wp_nonce_url( $location . '&del_stale_inactive=1', 'activation_key' ) . '" class="delete">'.__('Delete stale inactive signup keys older than 30 days').'</a>';76 echo '</span></div><br class="clear" />';77 */78 54 echo '<table class="widefat"><tbody>'; 79 55 echo '<thead><th>#</th><th>Registered</th><th>User</th><th>Email</th><th>Approve</th></thead>'; … … 96 72 } 97 73 98 if (class_exists("ds_user_activation_keys")) { 99 $ds_user_activation_keys = new ds_user_activation_keys(); 100 } 74 new DS_User_Activation_Keys(); 101 75 ?> -
user-activation-keys/trunk/readme.txt
r1470278 r1470381 48 48 49 49 == Changelog == 50 = 3.5.2 =51 * Tested up to: WP 3.9.2, removed batch delete, improved deleting an individual user key, typo fixes.50 = 4.6 = 51 * WP 4.6 tests OK, cleanup php notices 52 52 53 53 == Upgrade Notice == 54 = 3.5.2 =55 * Tested up to: WP 3.9.2, removed batch delete of old keys, improved deleting an individual user key, typo fixes.54 = 4.6 = 55 * WP 4.6 tests OK, cleanup php notices
Note: See TracChangeset
for help on using the changeset viewer.