Username Changer - Version 2.0.3

Version Description

Download this release

Release Info

Developer section214
Plugin Icon 128x128 Username Changer
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

Files changed (2) hide show
  1. readme.txt +5 -2
  2. username-changer.php +2 -2
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Username Changer ===
2
- Contributors: section214
3
  Donate link: http://pledgie.com/campaigns/17372
4
  Tags: user, username, display name, changer
5
  Requires at least: 3.0
6
  Tested up to: 3.4.1
7
- Stable tag: 2.0.2
8
 
9
  A simple plugin to change registered usernames.
10
 
@@ -28,6 +28,9 @@ None yet
28
 
29
  == Changelog ==
30
 
 
 
 
31
  = Version 2.0.2 =
32
  * Added multisite support
33
 
1
  === Username Changer ===
2
+ Contributors: Ghost1227
3
  Donate link: http://pledgie.com/campaigns/17372
4
  Tags: user, username, display name, changer
5
  Requires at least: 3.0
6
  Tested up to: 3.4.1
7
+ Stable tag: 2.0.3
8
 
9
  A simple plugin to change registered usernames.
10
 
28
 
29
  == Changelog ==
30
 
31
+ = Version 2.0.3 =
32
+ * Fixed user nice name
33
+
34
  = Version 2.0.2 =
35
  * Added multisite support
36
 
username-changer.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Username Changer
4
  * Description: Lets you change usernames.
5
- * Version: 2.0.2
6
  * Author: Daniel J Griffiths
7
  * Author URI: http://section214.com
8
  * Text Domain: username-changer
@@ -232,7 +232,7 @@ if( !class_exists( 'Username_Changer' ) ) {
232
  } elseif( $new_username != $current_username ) {
233
  // Update username!
234
  $q = $wpdb->prepare( "UPDATE $wpdb->users SET user_login = %s WHERE user_login = %s", $new_username, $current_username );
235
- $qnn = $wpdb->prepare( "UPDATE $wpdb->users SET user_nicename = %s WHERE user_login = %s", $new_username, $new_username );
236
 
237
  // Check if display name is the same as username
238
  $usersql = $wpdb->prepare( "SELECT * from $wpdb->users WHERE user_login = %s", $current_username );
2
  /**
3
  * Plugin Name: Username Changer
4
  * Description: Lets you change usernames.
5
+ * Version: 2.0.3
6
  * Author: Daniel J Griffiths
7
  * Author URI: http://section214.com
8
  * Text Domain: username-changer
232
  } elseif( $new_username != $current_username ) {
233
  // Update username!
234
  $q = $wpdb->prepare( "UPDATE $wpdb->users SET user_login = %s WHERE user_login = %s", $new_username, $current_username );
235
+ $qnn = $wpdb->prepare( "UPDATE $wpdb->users SET user_nicename = %s WHERE user_login = %s", $new_username, strtolower( str_replace( ' ', '-', $new_username ) ) );
236
 
237
  // Check if display name is the same as username
238
  $usersql = $wpdb->prepare( "SELECT * from $wpdb->users WHERE user_login = %s", $current_username );