New User Approve - Version 1.4.1

Version Description

  • delete transient of user statuses when a user is deleted
Download this release

Release Info

Developer picklewagon
Plugin Icon 128x128 New User Approve
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4 to 1.4.1

Files changed (2) hide show
  1. new-user-approve.php +8 -3
  2. readme.txt +4 -1
new-user-approve.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://www.picklewagon.com/wordpress/new-user-approve/
5
  Description: This plugin allows administrators to approve users once they register. Only approved users will be allowed to access the blog. For support, please go to the <a href="http://wordpress.org/support/plugin/new-user-approve">support forums</a> on wordpress.org.
6
  Author: Josh Harrison
7
- Version: 1.4
8
  Author URI: http://www.picklewagon.com/
9
  */
10
 
@@ -65,6 +65,7 @@ class pw_new_user_approve {
65
  add_action( 'user_register', array( $this, 'delete_new_user_approve_transient' ), 11 );
66
  add_action( 'new_user_approve_approve_user', array( $this, 'delete_new_user_approve_transient' ), 11 );
67
  add_action( 'new_user_approve_deny_user', array( $this, 'delete_new_user_approve_transient' ), 11 );
 
68
 
69
  // Filters
70
  add_filter( 'registration_errors', array( $this, 'show_user_pending_message' ), 10, 1 );
@@ -447,14 +448,18 @@ class pw_new_user_approve {
447
  $welcome = sprintf( __( 'Welcome to %s. This site is accessible to approved users only. To be approved, you must first register.', $this->plugin_id ), get_option( 'blogname' ) );
448
  $welcome = apply_filters( 'new_user_approve_welcome_message', $welcome );
449
 
450
- $message .= '<p class="message">' . $welcome . '</p>';
 
 
451
  }
452
 
453
  if ( isset( $_GET['action'] ) && $_GET['action'] == 'register' && ! $_POST ) {
454
  $instructions = sprintf( __( 'After you register, your request will be sent to the site administrator for approval. You will then receive an email with further instructions.', $this->plugin_id ) );
455
  $instructions = apply_filters( 'new_user_approve_register_instructions', $instructions );
456
 
457
- $message .= '<p class="message">' . $instructions . '</p>';
 
 
458
  }
459
 
460
  return $message;
4
  Plugin URI: http://www.picklewagon.com/wordpress/new-user-approve/
5
  Description: This plugin allows administrators to approve users once they register. Only approved users will be allowed to access the blog. For support, please go to the <a href="http://wordpress.org/support/plugin/new-user-approve">support forums</a> on wordpress.org.
6
  Author: Josh Harrison
7
+ Version: 1.4.1
8
  Author URI: http://www.picklewagon.com/
9
  */
10
 
65
  add_action( 'user_register', array( $this, 'delete_new_user_approve_transient' ), 11 );
66
  add_action( 'new_user_approve_approve_user', array( $this, 'delete_new_user_approve_transient' ), 11 );
67
  add_action( 'new_user_approve_deny_user', array( $this, 'delete_new_user_approve_transient' ), 11 );
68
+ add_action( 'deleted_user', array( $this, 'delete_new_user_approve_transient' ) );
69
 
70
  // Filters
71
  add_filter( 'registration_errors', array( $this, 'show_user_pending_message' ), 10, 1 );
448
  $welcome = sprintf( __( 'Welcome to %s. This site is accessible to approved users only. To be approved, you must first register.', $this->plugin_id ), get_option( 'blogname' ) );
449
  $welcome = apply_filters( 'new_user_approve_welcome_message', $welcome );
450
 
451
+ if ( ! empty( $welcome ) ) {
452
+ $message .= '<p class="message">' . $welcome . '</p>';
453
+ }
454
  }
455
 
456
  if ( isset( $_GET['action'] ) && $_GET['action'] == 'register' && ! $_POST ) {
457
  $instructions = sprintf( __( 'After you register, your request will be sent to the site administrator for approval. You will then receive an email with further instructions.', $this->plugin_id ) );
458
  $instructions = apply_filters( 'new_user_approve_register_instructions', $instructions );
459
 
460
+ if ( ! empty( $instructions ) ) {
461
+ $message .= '<p class="message">' . $instructions . '</p>';
462
+ }
463
  }
464
 
465
  return $message;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://picklewagon.com/wordpress/new-user-approve/donate
4
  Tags: users, registration
5
  Requires at least: 3.2.1
6
  Tested up to: 3.4.2
7
- Stable tag: 1.4
8
 
9
  New User Approve is a Wordpress plugin that allows a blog administrator to
10
  approve a user before they are able to access and login to the blog.
@@ -63,6 +63,9 @@ this feature.
63
 
64
  == Changelog ==
65
 
 
 
 
66
  = 1.4 =
67
  * add filters
68
  * honor the redirect if there is one set when registering
4
  Tags: users, registration
5
  Requires at least: 3.2.1
6
  Tested up to: 3.4.2
7
+ Stable tag: 1.4.1
8
 
9
  New User Approve is a Wordpress plugin that allows a blog administrator to
10
  approve a user before they are able to access and login to the blog.
63
 
64
  == Changelog ==
65
 
66
+ = 1.4.1 =
67
+ * delete transient of user statuses when a user is deleted
68
+
69
  = 1.4 =
70
  * add filters
71
  * honor the redirect if there is one set when registering