Temporary Login Without Password - Version 1.6.14

Version Description

  • Fix: User creation failed with non lating First Name or Last Name
  • Update: WordPress 5.8 compatibility check

=

Download this release

Release Info

Developer storeapps
Plugin Icon 128x128 Temporary Login Without Password
Version 1.6.14
Comparing to
See all releases

Code changes from version 1.6.13 to 1.6.14

includes/class-wp-temporary-login-without-password-common.php CHANGED
@@ -32,8 +32,22 @@ class Wp_Temporary_Login_Without_Password_Common {
32
  $name = $name . substr( uniqid( '', true ), - 6 );
33
  }
34
 
35
- return sanitize_user( $name, true );
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  /**
@@ -1192,4 +1206,23 @@ class Wp_Temporary_Login_Without_Password_Common {
1192
 
1193
 
1194
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
  }
32
  $name = $name . substr( uniqid( '', true ), - 6 );
33
  }
34
 
35
+ $username = sanitize_user( $name, true );
36
 
37
+ /**
38
+ * We are generating WordPress username from First Name & Last Name fields.
39
+ * When First Name or Last Name comes with non latin words, generated username
40
+ * is non latin and sanitize_user function discrad it and user is not being
41
+ * generated.
42
+ *
43
+ * To avoid this, if this situation occurs, we are generating random username
44
+ * for this user.
45
+ */
46
+ if ( empty( $username ) ) {
47
+ $username = self::random_username();
48
+ }
49
+
50
+ return sanitize_user( $username, true );
51
  }
52
 
53
  /**
1206
 
1207
 
1208
  }
1209
+
1210
+ /**
1211
+ * Generate username
1212
+ *
1213
+ * @param int $length
1214
+ *
1215
+ * @return string
1216
+ *
1217
+ * @since 1.6.14
1218
+ */
1219
+ public static function random_username( $length = 10 ) {
1220
+ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
1221
+ $random_username = '';
1222
+ for ( $i = 0; $i < $length; $i ++ ) {
1223
+ $random_username .= $characters[ rand( 0, strlen( $characters ) ) ];
1224
+ }
1225
+
1226
+ return sanitize_user( strtolower( $random_username ), true );
1227
+ }
1228
  }
includes/class-wp-temporary-login-without-password.php CHANGED
@@ -120,7 +120,7 @@ class Wp_Temporary_Login_Without_Password {
120
 
121
  $this->loader->add_action( 'admin_print_scripts', $plugin_admin, 'remove_admin_notices' );
122
 
123
- $this->loader->add_action( 'in_plugin_update_message-temporary-login-wihtout-password/temporary-login-wihtout-password.php', $plugin_admin, 'in_plugin_update_message', 10, 2 );
124
 
125
  $this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'update_admin_footer_text' );
126
  }
120
 
121
  $this->loader->add_action( 'admin_print_scripts', $plugin_admin, 'remove_admin_notices' );
122
 
123
+ $this->loader->add_action( 'in_plugin_update_message-temporary-login-without-password/temporary-login-without-password.php', $plugin_admin, 'in_plugin_update_message', 10, 2 );
124
 
125
  $this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'update_admin_footer_text' );
126
  }
readme.txt CHANGED
@@ -3,8 +3,9 @@ Contributors: storeapps, icegram, niravmehta, malayladu, asmipatel
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BMFRMVXQ87JWA&source=url
4
  Tags: temporary access, developer access, passwordless login, magic pin, secure login
5
  Requires at least: 3.0.1
6
- Tested up to: 5.7.2
7
- Stable tag: 1.6.13
 
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -146,7 +147,7 @@ No. Temporary Users can't delete other users.
146
 
147
  = 9. How to redirect temporary user to a specific page after login? =
148
 
149
- You can select the page where you want to redirect your temporary user after login White creating a temporary login. Alternatively, you can use the "redirect_to" query string parameter to redirect them to other pages. [Please refer to this thread](https://wordpress.org/support/topic/redirect-user-after-login-2/).
150
 
151
  = 10. Can I use a fake email address or my email address to generate a temporary login link for others? =
152
 
@@ -168,16 +169,17 @@ Yes. There is no limit to create temporary logins. You can create as many tempor
168
 
169
  == Upgrade Notice ==
170
 
171
- = 1.6.13 =
172
- * New: Added option delete temporary login plugin data on plugin delete
173
- * Update: Create username with lowercase letters
174
- * Update: Improve settings screen UI
175
- * Update: .POT files
176
- * Fix: Internationalization issues. (Thanks [@yordansoares](https://wordpress.org/support/users/yordansoares/) for reporting the [issue](https://wordpress.org/support/topic/internationalization-issues/))
177
- * Fix: Blank page appear after settings saved.
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
181
  **1.6.13 [2021-05-21]**
182
 
183
  * New: Added option delete temporary login plugin data on plugin delete
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BMFRMVXQ87JWA&source=url
4
  Tags: temporary access, developer access, passwordless login, magic pin, secure login
5
  Requires at least: 3.0.1
6
+ Requires PHP: 5.3
7
+ Tested up to: 5.8
8
+ Stable tag: 1.6.14
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
147
 
148
  = 9. How to redirect temporary user to a specific page after login? =
149
 
150
+ You can select the page where you want to redirect your temporary user after login while creating a temporary login. Alternatively, you can use the "redirect_to" query string parameter to redirect them to other pages. [Please refer to this thread](https://wordpress.org/support/topic/redirect-user-after-login-2/).
151
 
152
  = 10. Can I use a fake email address or my email address to generate a temporary login link for others? =
153
 
169
 
170
  == Upgrade Notice ==
171
 
172
+ = 1.6.14 =
173
+ * Fix: User creation failed with non lating First Name or Last Name
174
+ * Update: WordPress 5.8 compatibility check
 
 
 
 
175
 
176
  == Changelog ==
177
 
178
+ **1.6.14 [2021-07-27]**
179
+
180
+ * Fix: User creation failed with non lating First Name or Last Name (Thanks [@gmspb](https://profiles.wordpress.org/gmspb/) for [reporting](https://wordpress.org/support/topic/name-in-latin-only/))
181
+ * Update: WordPress 5.8 compatibility check
182
+
183
  **1.6.13 [2021-05-21]**
184
 
185
  * New: Added option delete temporary login plugin data on plugin delete
temporary-login-without-password.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: Temporary Login Without Password
4
  * Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
5
  * Description: Create a temporary login link with any role using which one can access to your sytem without username and password for limited period of time.
6
- * Version: 1.6.13
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
- * Tested up to: 5.7.2
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
@@ -25,7 +25,7 @@ if ( ! defined( 'WPINC' ) ) {
25
  /**
26
  * Define constants
27
  */
28
- define( 'WTLWP_PLUGIN_VERSION', '1.6.13' );
29
  define( 'WTLWP_FEEDBACK_VERSION', '1.2.4' );
30
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
31
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
3
  * Plugin Name: Temporary Login Without Password
4
  * Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
5
  * Description: Create a temporary login link with any role using which one can access to your sytem without username and password for limited period of time.
6
+ * Version: 1.6.14
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
+ * Tested up to: 5.8
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
25
  /**
26
  * Define constants
27
  */
28
+ define( 'WTLWP_PLUGIN_VERSION', '1.6.14' );
29
  define( 'WTLWP_FEEDBACK_VERSION', '1.2.4' );
30
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
31
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );