Theme My Login - Version 5.1.6

Version Description

  • Fix issue with spaces in usernames
Download this release

Release Info

Developer jfarthing84
Plugin Icon 128x128 Theme My Login
Version 5.1.6
Comparing to
See all releases

Code changes from version 5.1.5 to 5.1.6

includes/functions.php CHANGED
@@ -58,8 +58,12 @@ function wdbj_tml_get_current_url($query = '') {
58
  $url = remove_query_arg($keys, $self);
59
 
60
  if ( !empty($query) ) {
61
- $query = wp_parse_args($query);
62
- $url = add_query_arg($query, $url);
 
 
 
 
63
  }
64
  return $url;
65
  }
58
  $url = remove_query_arg($keys, $self);
59
 
60
  if ( !empty($query) ) {
61
+ wp_parse_str($query, $r);
62
+ foreach ( $r as $k => $v ) {
63
+ if ( strpos($v, ' ') !== false )
64
+ $r[$k] = rawurlencode($v);
65
+ }
66
+ $url = add_query_arg($r, $url);
67
  }
68
  return $url;
69
  }
includes/hook-functions.php CHANGED
@@ -35,13 +35,16 @@ function wdbj_tml_single_post_title($title) {
35
 
36
  function wdbj_tml_site_url($url, $path, $orig_scheme) {
37
  if ( strpos($url, 'wp-login.php') !== false && !isset($_REQUEST['interim-login']) ) {
38
- $orig_url = $url;
39
  $url = get_permalink(wdbj_tml_get_option('page_id'));
40
- if ( strpos($orig_url, '?') ) {
41
- $query = substr($orig_url, strpos($orig_url, '?') + 1);
42
- parse_str($query, $r);
43
- $url = add_query_arg($r, $url);
44
- }
 
 
 
45
  }
46
  return $url;
47
  }
35
 
36
  function wdbj_tml_site_url($url, $path, $orig_scheme) {
37
  if ( strpos($url, 'wp-login.php') !== false && !isset($_REQUEST['interim-login']) ) {
38
+ $parsed_url = parse_url($url);
39
  $url = get_permalink(wdbj_tml_get_option('page_id'));
40
+ if ( isset($parsed_url['query']) ) {
41
+ wp_parse_str($parsed_url['query'], $r);
42
+ foreach ( $r as $k => $v ) {
43
+ if ( strpos($v, ' ') !== false )
44
+ $r[$k] = rawurlencode($v);
45
+ }
46
+ $url = add_query_arg($r, $url);
47
+ }
48
  }
49
  return $url;
50
  }
modules/themed-profiles/themed-profiles.php CHANGED
@@ -81,15 +81,16 @@ function wdbj_tml_themed_profiles_template_redirect() {
81
  }
82
 
83
  function wdbj_tml_themed_profiles_site_url($url, $path, $orig_scheme = '') {
84
- global $wp_rewrite, $current_user;
85
-
86
  if ( is_user_logged_in() ) {
87
  if ( strpos($url, 'profile.php') !== false ) {
88
- $orig_url = $url;
89
  $url = add_query_arg('action', 'profile', get_permalink(wdbj_tml_get_option('page_id')));
90
- if ( strpos($orig_url, '?') ) {
91
- $query = substr($orig_url, strpos($orig_url, '?') + 1);
92
- parse_str($query, $r);
 
 
 
93
  $url = add_query_arg($r, $url);
94
  }
95
  }
81
  }
82
 
83
  function wdbj_tml_themed_profiles_site_url($url, $path, $orig_scheme = '') {
 
 
84
  if ( is_user_logged_in() ) {
85
  if ( strpos($url, 'profile.php') !== false ) {
86
+ $parsed_url = parse_url($url);
87
  $url = add_query_arg('action', 'profile', get_permalink(wdbj_tml_get_option('page_id')));
88
+ if ( isset($parsed_url['query']) ) {
89
+ wp_parse_str($parsed_url['query'], $r);
90
+ foreach ( $r as $k => $v ) {
91
+ if ( strpos($v, ' ') !== false )
92
+ $r[$k] = rawurlencode($v);
93
+ }
94
  $url = add_query_arg($r, $url);
95
  }
96
  }
modules/user-moderation/includes/functions.php CHANGED
@@ -121,7 +121,7 @@ function wdbj_tml_user_mod_new_user_activation_notification($user_id, $key = '')
121
  // we want to reverse this for the plain text arena of emails.
122
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
123
 
124
- $activation_url = add_query_arg(array('action' => 'activate', 'key' => $key, 'login' => $user_login), wp_login_url());
125
 
126
  $title = sprintf(__('[%s] Activate Your Account', 'theme-my-login'), $blogname);
127
  $message = sprintf(__('Thanks for registering at %s! To complete the activation of your account please click the following link: ', 'theme-my-login'), $blogname) . "\r\n\r\n";
121
  // we want to reverse this for the plain text arena of emails.
122
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
123
 
124
+ $activation_url = add_query_arg(array('action' => 'activate', 'key' => $key, 'login' => rawurlencode($user_login)), wp_login_url());
125
 
126
  $title = sprintf(__('[%s] Activate Your Account', 'theme-my-login'), $blogname);
127
  $message = sprintf(__('Thanks for registering at %s! To complete the activation of your account please click the following link: ', 'theme-my-login'), $blogname) . "\r\n\r\n";
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.jfarthing.com/donate
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 2.8
6
  Tested up to: 3.0
7
- Stable tag: 5.1.5
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
@@ -43,6 +43,9 @@ None yet. Please visit http://www.jfarthing.com/forum for any support!
43
 
44
  == Changelog ==
45
 
 
 
 
46
  = 5.1.5 =
47
  * Fix blank page redirect bug
48
 
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 2.8
6
  Tested up to: 3.0
7
+ Stable tag: 5.1.6
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
43
 
44
  == Changelog ==
45
 
46
+ = 5.1.6 =
47
+ * Fix issue with spaces in usernames
48
+
49
  = 5.1.5 =
50
  * Fix blank page redirect bug
51
 
theme-my-login.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
- Version: 5.1.5
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
+ Version: 5.1.6
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login