Temporary Login Without Password - Version 1.5.10

Version Description

Download this release

Release Info

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

Code changes from version 1.5.9 to 1.5.10

config.txt ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Config Variables
2
+
3
+ # Format dir_name[key] - not using in plugin-release.sh
4
+ dir_name[sm]=$3
5
+ dir_name[sr]=$3
6
+ dir_name[elwp]=$3
7
+ dir_name[oyp]=$3
8
+ dir_name[so]=$3
9
+ dir_name[srf]=$3
10
+ dir_name[bvm]=$3
11
+ dir_name[wlwp]=$3
12
+ dir_name[acvo]=$3
13
+ dir_name[bn]=$3
14
+ dir_name[wcr]=$3
15
+ dir_name[wcsk]=$3
16
+ dir_name[wcsi]=$3
17
+ dir_name[wcsr]=$3
18
+ dir_name[uvc]=$3
19
+ dir_name[sc]=$3
20
+ dir_name[cp]=$3
21
+ dir_name[ctp]=$3
22
+ dir_name[wsrf]=$3
23
+ dir_name[seg]=$3
24
+ dir_name[es]=$3
25
+ dir_name[esaf]=$3
26
+ dir_name[nas]=$3
27
+ dir_name[tlwp]=$3
28
+ dir_name[wpc]=$3
29
+ dir_name[kc]=$3
30
+ dir_name[cbl]=$3
31
+ dir_name[gbl]=$3
32
+ dir_name[cm]=$3
33
+ dir_name[sfl]=$3
34
+ dir_name[ecw]=$3
35
+ dir_name[fbt]=$3
36
+ dir_name[rvp]=$3
37
+ dir_name[saw]=$3
38
+ dir_name[saff]=$3
39
+ dir_name[se]=$3
40
+
41
+
42
+ # Format plugin_key[plugin_name]
43
+ plugin_key[smart-manager-for-wp-e-commerce]=sm
44
+ plugin_key[smart-reporter-for-wp-e-commerce]=sr
45
+ plugin_key[express-login-for-wordpress]=elwp
46
+ plugin_key[offer-your-price]=oyp
47
+ plugin_key[smart-offers]=so
48
+ plugin_key[smart-refunder]=srf
49
+ plugin_key[wc-bulk-variations-manager]=bvm
50
+ plugin_key[whmcs-login-for-wordpress]=wlwp
51
+ plugin_key[woocommerce-auto-complete-virtual-orders]=acvo
52
+ plugin_key[woocommerce-buy-now]=bn
53
+ plugin_key[woocommerce-renewals]=wcr
54
+ plugin_key[woocommerce-serial-key]=wcsk
55
+ plugin_key[woocommerce-sold-individually]=wcsi
56
+ plugin_key[woocommerce-subscription-reports]=wcsr
57
+ plugin_key[woocommerce-update-variations-in-cart]=uvc
58
+ plugin_key[woocommerce-smart-coupons]=sc
59
+ plugin_key[woocommerce-chained-products]=cp
60
+ plugin_key[sa-custom-thank-you-pages]=ctp
61
+ plugin_key[woocommerce-smart-refunder]=wsrf
62
+ plugin_key[woocommerce-segmentio-connector]=seg
63
+ plugin_key[email-subscribers]=es
64
+ plugin_key[email-subscribers-advanced-form]=esaf
65
+ plugin_key[news-announcement-scroll]=nas
66
+ plugin_key[temporary-login-without-password]=tlwp
67
+ plugin_key[woocommerce-putler-connector]=wpc
68
+ plugin_key[klawoo-connector]=kc
69
+ plugin_key[woocommerce-coupons-by-location]=cbl
70
+ plugin_key[woocommerce-gateways-by-location]=gbl
71
+ plugin_key[woocommerce-coupon-message]=cm
72
+ plugin_key[save-for-later-for-woocommerce]=sfl
73
+ plugin_key[express-checkout-for-woocommerce-for-virtual-and-downloadable-products]=ecw
74
+ plugin_key[frequently-bought-together-for-woo]=fbt
75
+ plugin_key[recently-viewed-products-for-woocommerce]=rvp
76
+ plugin_key[saved-addresses-for-woocommerce]=saw
77
+ plugin_key[smart-affiliates]=saff
78
+ plugin_key[smart-emails]=se
79
+
80
+
81
+ # Format changelog[$key]
82
+ changelog[smt]=readme.txt
83
+ changelog[sm]=readme.txt
84
+ changelog[sr]=readme.txt
85
+ changelog[elwp]=changelog.txt
86
+ changelog[oyp]=changelog.txt
87
+ changelog[so]=changelog.txt
88
+ changelog[srf]=changelog.txt
89
+ changelog[bvm]=changelog.txt
90
+ changelog[wlwp]=changelog.txt
91
+ changelog[acvo]=changelog.txt
92
+ changelog[bn]=changelog.txt
93
+ changelog[wcr]=changelog.txt
94
+ changelog[wcsk]=changelog.txt
95
+ changelog[wcsi]=changelog.txt
96
+ changelog[wcsr]=changelog.txt
97
+ changelog[uvc]=changelog.txt
98
+ changelog[sc]=changelog.txt
99
+ changelog[cp]=changelog.txt
100
+ changelog[ctp]=changelog.txt
101
+ changelog[wsrf]=changelog.txt
102
+ changelog[seg]=changelog.txt
103
+ changelog[es]=readme.txt
104
+ changelog[esaf]=readme.txt
105
+ changelog[nas]=readme.txt
106
+ changelog[tlwp]=readme.txt
107
+ changelog[wpc]=readme.txt
108
+ changelog[kc]=readme.txt
109
+ changelog[cbl]=readme.txt
110
+ changelog[gbl]=readme.txt
111
+ changelog[cm]=readme.txt
112
+ changelog[sfl]=changelog.txt
113
+ changelog[ecw]=changelog.txt
114
+ changelog[fbt]=changelog.txt
115
+ changelog[rvp]=changelog.txt
116
+ changelog[saw]=changelog.txt
117
+ changelog[saff]=changelog.txt
118
+ changelog[se]=changelog.txt
119
+
120
+
121
+ # Format mainfile[key]
122
+ mainfile[sm]=smart-manager.php
123
+ mainfile[smt]=smart-manager.php
124
+ mainfile[tlwp]=temporary-login-without-password.php
125
+
126
+
127
+ # Format source[key] - not using in plugin-release.sh
128
+ source[sm]=$4
129
+ source[sr]=$4
130
+ source[elwp]=$4
131
+ source[oyp]=$4
132
+ source[so]=$4
133
+ source[srf]=$4
134
+ source[bvm]=$4
135
+ source[wlwp]=$4
136
+ source[acvo]=$4
137
+ source[bn]=$4
138
+ source[wcr]=$4
139
+ source[wcsk]=$4
140
+ source[wcsi]=$4
141
+ source[wcsr]=$4
142
+ source[uvc]=$4
143
+ source[sc]=$4
144
+ source[cp]=$4
145
+ source[ctp]=$4
146
+ source[wsrf]=$4
147
+ source[seg]=$4
148
+ source[es]=$4
149
+ source[esaf]=$4
150
+ source[nas]=$4
151
+ source[tlwp]=$4
152
+ source[wpc]=$4
153
+ source[kc]=$4
154
+ source[cbl]=$4
155
+ source[gbl]=$4
156
+ source[cm]=$4
157
+ source[sfl]=$4
158
+ source[ecw]=$4
159
+ source[fbt]=$4
160
+ source[rvp]=$4
161
+ source[saw]=$4
162
+ source[saff]=$4
163
+ source[se]=$4
164
+
165
+
166
+
167
+
168
+
169
+ # Format wp_destination[key] - not using in plugin-release.sh
170
+ wp_destination[sm]=~/public_html/plugins.wordpress/
171
+ wp_destination[sr]=~/public_html/plugins.wordpress/
172
+ wp_destination[es]=~/public_html/plugins.wordpress/
173
+ wp_destination[esaf]=~/public_html/plugins.wordpress/
174
+ wp_destination[nas]=~/public_html/plugins.wordpress/
175
+ wp_destination[tlwp]=~/public_html/plugins.wordpress/
176
+ wp_destination[wpc]=~/public_html/plugins.wordpress/
177
+ wp_destination[kc]=~/public_html/plugins.wordpress/
178
+
179
+
180
+
181
+
182
+
183
+ # Format git_destination[key] - not using in plugin-release.sh
184
+ git_destination[sm]=$2
185
+ git_destination[sr]=$2
186
+ git_destination[es]=$2
187
+ git_destination[esaf]=$2
188
+ git_destination[nas]=$2
189
+ git_destination[tlwp]=$2
190
+ git_destination[wpc]=$2
191
+ git_destination[kc]=$2
192
+ git_destination[elwp]=$2
193
+ git_destination[oyp]=$2
194
+ git_destination[so]=$2
195
+ git_destination[srf]=$2
196
+ git_destination[bvm]=$2
197
+ git_destination[wlwp]=$2
198
+ git_destination[acvo]=$2
199
+ git_destination[bn]=$2
200
+ git_destination[wcr]=$2
201
+ git_destination[wcsk]=$2
202
+ git_destination[wcsi]=$2
203
+ git_destination[wcsr]=$2
204
+ git_destination[uvc]=$2
205
+ git_destination[sc]=$2
206
+ git_destination[cp]=$2
207
+ git_destination[ctp]=$2
208
+ git_destination[wsrf]=$2
209
+ git_destination[seg]=$2
210
+ git_destination[cbl]=$2
211
+ git_destination[gbl]=$2
212
+ git_destination[sfl]=$2
213
+ git_destination[ecw]=$2
214
+ git_destination[fbt]=$2
215
+ git_destination[rvp]=$2
216
+ git_destination[saw]=$2
217
+ git_destination[saff]=$2
218
+ git_destination[se]=$2
219
+
220
+
221
+
222
+
223
+
224
+ # Format woo_destination[key]
225
+ woo_destination[sc]=~/public_html/github/
226
+ woo_destination[cp]=~/public_html/github/
227
+ woo_destination[wsrf]=~/public_html/github/
228
+ woo_destination[seg]=~/public_html/github/
229
+
230
+
231
+
232
+
233
+
234
+
235
+ # Access Tockens
236
+ woo_access_token=b0f95e093b400fe54be2306d2fad42c26cdee063
languages/temporary-login-without-password.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2018-07-24 07:53+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -222,7 +222,7 @@ msgstr ""
222
  msgid "Authentication failed"
223
  msgstr ""
224
 
225
- #: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/public/class-wp-temporary-login-without-password-public.php:116
226
  msgid "You don't have permission to access this page"
227
  msgstr ""
228
 
@@ -339,5 +339,5 @@ msgid "StoreApps"
339
  msgstr ""
340
 
341
  #. Author URI of the plugin
342
- msgid "http://storeapps.org"
343
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2018-08-08 12:11+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
222
  msgid "Authentication failed"
223
  msgstr ""
224
 
225
+ #: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/public/class-wp-temporary-login-without-password-public.php:122
226
  msgid "You don't have permission to access this page"
227
  msgstr ""
228
 
339
  msgstr ""
340
 
341
  #. Author URI of the plugin
342
+ msgid "https://storeapps.org"
343
  msgstr ""
public/class-wp-temporary-login-without-password-public.php CHANGED
@@ -74,6 +74,7 @@ class Wp_Temporary_Login_Without_Password_Public {
74
  $wtlwp_token = sanitize_key( $_GET['wtlwp_token'] ); // Input var okay.
75
  $users = Wp_Temporary_Login_Without_Password_Common::get_valid_user_based_on_wtlwp_token( $wtlwp_token );
76
 
 
77
  if ( empty( $users ) ) {
78
  wp_safe_redirect( home_url() );
79
  } else {
@@ -85,8 +86,8 @@ class Wp_Temporary_Login_Without_Password_Public {
85
  wp_set_current_user( $user_id, $user_login );
86
  wp_set_auth_cookie( $user_id );
87
 
88
- $redirect_to = admin_url();
89
- $redirect_to_url = apply_filters( 'login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user ); // phpcs:ignore
90
 
91
  do_action( 'wp_login', $user_login, $user );
92
 
@@ -101,13 +102,18 @@ class Wp_Temporary_Login_Without_Password_Public {
101
  }
102
 
103
  if ( is_user_logged_in() ) {
 
104
  $user_id = get_current_user_id();
105
  if ( ! empty( $user_id ) && Wp_Temporary_Login_Without_Password_Common::is_valid_temporary_login( $user_id, false ) ) {
106
  if ( Wp_Temporary_Login_Without_Password_Common::is_login_expired( $user_id ) ) {
 
107
  wp_logout();
108
  wp_safe_redirect( home_url() );
 
 
109
  exit();
110
  } else {
 
111
  global $pagenow;
112
  $bloked_pages = Wp_Temporary_Login_Without_Password_Common::get_blocked_pages();
113
  $page = ! empty( $_GET['page'] ) ? $_GET['page'] : ''; //phpcs:ignore
@@ -115,6 +121,7 @@ class Wp_Temporary_Login_Without_Password_Public {
115
  if ( ! empty( $page ) && in_array( $page, $bloked_pages) || ( ! empty( $pagenow ) && ( in_array( $pagenow, $bloked_pages ) ) ) || ( ! empty( $pagenow ) && ( 'users.php' === $pagenow && isset( $_GET['action'] ) && ( 'deleteuser' === $_GET['action'] || 'delete' === $_GET['action'] ) ) ) ) { //phpcs:ignore
116
  wp_die( esc_attr__( "You don't have permission to access this page", 'temporary-login-without-password' ) );
117
  }
 
118
  }
119
  }
120
  }
74
  $wtlwp_token = sanitize_key( $_GET['wtlwp_token'] ); // Input var okay.
75
  $users = Wp_Temporary_Login_Without_Password_Common::get_valid_user_based_on_wtlwp_token( $wtlwp_token );
76
 
77
+
78
  if ( empty( $users ) ) {
79
  wp_safe_redirect( home_url() );
80
  } else {
86
  wp_set_current_user( $user_id, $user_login );
87
  wp_set_auth_cookie( $user_id );
88
 
89
+ $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : admin_url();
90
+ $redirect_to_url = apply_filters( 'login_redirect', $redirect_to, false, $user ); // phpcs:ignore
91
 
92
  do_action( 'wp_login', $user_login, $user );
93
 
102
  }
103
 
104
  if ( is_user_logged_in() ) {
105
+
106
  $user_id = get_current_user_id();
107
  if ( ! empty( $user_id ) && Wp_Temporary_Login_Without_Password_Common::is_valid_temporary_login( $user_id, false ) ) {
108
  if ( Wp_Temporary_Login_Without_Password_Common::is_login_expired( $user_id ) ) {
109
+ die('Check');
110
  wp_logout();
111
  wp_safe_redirect( home_url() );
112
+
113
+
114
  exit();
115
  } else {
116
+
117
  global $pagenow;
118
  $bloked_pages = Wp_Temporary_Login_Without_Password_Common::get_blocked_pages();
119
  $page = ! empty( $_GET['page'] ) ? $_GET['page'] : ''; //phpcs:ignore
121
  if ( ! empty( $page ) && in_array( $page, $bloked_pages) || ( ! empty( $pagenow ) && ( in_array( $pagenow, $bloked_pages ) ) ) || ( ! empty( $pagenow ) && ( 'users.php' === $pagenow && isset( $_GET['action'] ) && ( 'deleteuser' === $_GET['action'] || 'delete' === $_GET['action'] ) ) ) ) { //phpcs:ignore
122
  wp_die( esc_attr__( "You don't have permission to access this page", 'temporary-login-without-password' ) );
123
  }
124
+
125
  }
126
  }
127
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: storeapps, niravmehta, malayladu
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
4
  Tags: temporary access, developer access, admin login, temporary login, passwordless login, customer login, secure login, access, admin, log in, login, login security, protection, user login, user login, wordpress admin login, wordpress login, wp-admin, wp-login, expiration, login, Login Without Password, user, WordPress Admin, wp-admin, developer login
5
  Requires at least: 3.0.1
6
- Tested up to: 4.9.7
7
- Stable tag: 1.5.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -33,7 +33,31 @@ If you like Temporary Login Without Password, please leave a five star review on
33
 
34
  1. Unzip downloaded folder and upload it to 'wp-content/plugins/' folder
35
  2. Activate the plugin through the 'Plugins' menu in WordPress
36
- 3. Go to Users > Temporary Login section and create a new temporary login.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  == Screenshots ==
39
 
@@ -44,6 +68,10 @@ If you like Temporary Login Without Password, please leave a five star review on
44
 
45
  == Changelog ==
46
 
 
 
 
 
47
  **1.5.9 [2018-07-25]**
48
 
49
  * Update: Added settings to set default expiration time. Now, admin don't have to select expiry time from drodown every time when they
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
4
  Tags: temporary access, developer access, admin login, temporary login, passwordless login, customer login, secure login, access, admin, log in, login, login security, protection, user login, user login, wordpress admin login, wordpress login, wp-admin, wp-login, expiration, login, Login Without Password, user, WordPress Admin, wp-admin, developer login
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.9.8
7
+ Stable tag: 1.5.10
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
33
 
34
  1. Unzip downloaded folder and upload it to 'wp-content/plugins/' folder
35
  2. Activate the plugin through the 'Plugins' menu in WordPress
36
+ 3. Go to Users > Temporary Login section and create a new temporary login.
37
+
38
+ == Frequently Asked Questions ==
39
+
40
+ = 1. Do I need username & password to login using Temporary Login? =
41
+
42
+ No. Temporary Login Without Password plugin creates temporary login link to login into WordPress. User only have to go
43
+ to clik on the temporary login link and they will automatically login into WordPress.
44
+
45
+ = 2. Can I disable Temporary user manually? =
46
+
47
+ Yes, you can disable temporary user manually.
48
+
49
+ = 3. Can I delete temporary user?
50
+
51
+ Yes, you can delete temporary user.
52
+
53
+ = 4. Is temporary user login with username & password?
54
+
55
+ No. temporary user can't login with username & password.
56
+
57
+ = 5. Can I convert temporary user into normal user?
58
+
59
+ No. at this moment it's not possible to do this.
60
+
61
 
62
  == Screenshots ==
63
 
68
 
69
  == Changelog ==
70
 
71
+ **1.5.10 [2018-09-12]**
72
+
73
+ * Fix: 'redirect_to' parameter in request didn't use for user redirection. Now, temporary user will be redirected to url available in 'redirect_to' parameter.
74
+
75
  **1.5.9 [2018-07-25]**
76
 
77
  * Update: Added settings to set default expiration time. Now, admin don't have to select expiry time from drodown every time when they
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.5.9
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
- * Tested up to: 4.9.7
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
  * Define constants
27
  */
28
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
29
- define( 'WTLWP_PLUGIN_VERSION', '1.5.9' );
30
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
31
 
32
  /**
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.5.10
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
+ * Tested up to: 4.9.8
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
26
  * Define constants
27
  */
28
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
29
+ define( 'WTLWP_PLUGIN_VERSION', '1.5.10' );
30
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
31
 
32
  /**