Version Description
Download this release
Release Info
Developer | storeapps |
Plugin | Temporary Login Without Password |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
- admin/class-wp-temporary-login-without-password-admin.php +76 -38
- admin/css/wp-temporary-login-without-password-admin.css +42 -39
- admin/js/wp-temporary-login-without-password-admin.js +6 -0
- includes/class-wp-temporary-login-without-password-common.php +187 -8
- includes/class-wp-temporary-login-without-password-layout.php +2 -0
- includes/class-wp-temporary-login-without-password.php +1 -1
- languages/temporary-login-without-password.pot +70 -42
- readme.txt +37 -33
- templates/admin_settings.php +14 -4
- templates/update_login.php +88 -0
- temporary-login-without-password.php +2 -2
admin/class-wp-temporary-login-without-password-admin.php
CHANGED
@@ -95,8 +95,15 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
95 |
$wtlwp_generated_url = ! empty( $_REQUEST['wtlwp_generated_url'] ) ? $_REQUEST['wtlwp_generated_url'] : '';
|
96 |
$user_email = ! empty( $_REQUEST['user_email'] ) ? $_REQUEST['user_email'] : '';
|
97 |
$tlwp_settings = maybe_unserialize( get_option( 'tlwp_settings', array() ) );
|
|
|
|
|
|
|
98 |
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
$visible_roles = ( ! empty( $tlwp_settings ) && isset( $tlwp_settings['visible_roles'] ) ) ? $tlwp_settings['visible_roles'] : '';
|
101 |
|
102 |
include $_template_file;
|
@@ -109,13 +116,14 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
109 |
*/
|
110 |
public function create_user() {
|
111 |
|
112 |
-
|
|
|
113 |
return;
|
114 |
}
|
115 |
|
116 |
$data = $_POST['wtlwp_data'];
|
117 |
$email = $data['user_email'];
|
118 |
-
$error =
|
119 |
$result = array();
|
120 |
|
121 |
$redirect_link = '';
|
@@ -124,31 +132,28 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
124 |
'status' => 'error',
|
125 |
'message' => 'unathorised_access',
|
126 |
);
|
127 |
-
$error = true;
|
128 |
} elseif ( ! wp_verify_nonce( $_POST['wtlwp-nonce'], 'wtlwp_generate_login_url' ) ) {
|
129 |
$result = array(
|
130 |
'status' => 'error',
|
131 |
'message' => 'nonce_failed',
|
132 |
);
|
133 |
-
$error = true;
|
134 |
} elseif ( empty( $data['user_email'] ) ) {
|
135 |
$result = array(
|
136 |
'status' => 'error',
|
137 |
'message' => 'empty_email',
|
138 |
);
|
139 |
-
$error = true;
|
140 |
} elseif ( ! is_email( $email ) ) {
|
141 |
$result = array(
|
142 |
'status' => 'error',
|
143 |
'message' => 'not_valid_email',
|
144 |
);
|
145 |
-
$error = true;
|
146 |
} elseif ( ! empty( $data['user_email'] ) && email_exists( $data['user_email'] ) ) {
|
147 |
$result = array(
|
148 |
'status' => 'error',
|
149 |
'message' => 'email_is_in_use',
|
150 |
);
|
151 |
-
|
|
|
152 |
}
|
153 |
|
154 |
if ( ! $error ) {
|
@@ -190,7 +195,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
190 |
|
191 |
$data = $_POST['tlwp_settings_data'];
|
192 |
|
193 |
-
$default_role
|
194 |
$visible_roles = isset( $data['visible_roles'] ) ? $data['visible_roles'] : array();
|
195 |
|
196 |
if ( ! in_array( $default_role, $visible_roles ) ) {
|
@@ -198,7 +203,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
198 |
}
|
199 |
|
200 |
$tlwp_settings = array(
|
201 |
-
'default_role'
|
202 |
'visible_roles' => $visible_roles,
|
203 |
);
|
204 |
|
@@ -240,6 +245,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
240 |
'disable',
|
241 |
'enable',
|
242 |
'delete',
|
|
|
243 |
);
|
244 |
|
245 |
if ( ! in_array( $action, $valid_actions ) ) {
|
@@ -274,7 +280,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
274 |
}
|
275 |
|
276 |
if ( ! $error ) {
|
277 |
-
if (
|
278 |
$disable_login = Wp_Temporary_Login_Without_Password_Common::manage_login( absint( $user_id ), 'disable' );
|
279 |
if ( $disable_login ) {
|
280 |
$result = array(
|
@@ -287,7 +293,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
287 |
'message' => 'default_error_message',
|
288 |
);
|
289 |
}
|
290 |
-
} elseif (
|
291 |
$enable_login = Wp_Temporary_Login_Without_Password_Common::manage_login( absint( $user_id ), 'enable' );
|
292 |
|
293 |
if ( $enable_login ) {
|
@@ -301,7 +307,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
301 |
'message' => 'default_error_message',
|
302 |
);
|
303 |
}
|
304 |
-
} elseif (
|
305 |
$delete_user = wp_delete_user( $user_id, get_current_user_id() );
|
306 |
|
307 |
// delete user from Multisite network too!
|
@@ -326,6 +332,28 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
326 |
'message' => 'default_error_message',
|
327 |
);
|
328 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
} else {
|
330 |
$result = array(
|
331 |
'status' => 'error',
|
@@ -346,7 +374,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
346 |
*/
|
347 |
public function display_admin_notices() {
|
348 |
|
349 |
-
if ( empty( $_REQUEST['page'] ) || ( empty( $_REQUEST['page'] ) &&
|
350 |
return;
|
351 |
}
|
352 |
|
@@ -400,6 +428,9 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
400 |
case 'user_created':
|
401 |
$message = __( 'Login created successfully!', 'temporary-login-without-password' );
|
402 |
break;
|
|
|
|
|
|
|
403 |
|
404 |
case 'user_deleted':
|
405 |
$message = __( 'Login deleted successfully!', 'temporary-login-without-password' );
|
@@ -417,6 +448,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
417 |
$message = __( 'Settings have been updated successfully', 'temporary-login-without-password' );
|
418 |
break;
|
419 |
|
|
|
420 |
default:
|
421 |
$message = __( 'Success!', 'temporary-login-without-password' );
|
422 |
break;
|
@@ -487,7 +519,10 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
487 |
* Triggered when clicking the rating footer.
|
488 |
*/
|
489 |
public static function tlwp_rated() {
|
490 |
-
|
|
|
|
|
|
|
491 |
wp_die();
|
492 |
}
|
493 |
|
@@ -495,7 +530,10 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
495 |
* Triggered when clicking the rating link from header.
|
496 |
*/
|
497 |
public static function tlwp_reivew_header() {
|
498 |
-
|
|
|
|
|
|
|
499 |
wp_die();
|
500 |
}
|
501 |
|
@@ -506,9 +544,11 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
506 |
*/
|
507 |
public static function can_ask_for_review() {
|
508 |
|
509 |
-
$
|
510 |
-
|
511 |
-
$
|
|
|
|
|
512 |
|
513 |
$temporary_logins = Wp_Temporary_Login_Without_Password_Common::get_temporary_logins();
|
514 |
$total_logins = count( $temporary_logins );
|
@@ -527,34 +567,32 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
527 |
*/
|
528 |
public function tlwp_ask_user_for_review() {
|
529 |
|
530 |
-
$
|
531 |
-
|
532 |
-
if ( isset( $current_screen->id ) && $current_screen->id == 'users_page_wp-temporary-login-without-password' ) {
|
533 |
|
534 |
-
|
535 |
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
|
540 |
-
|
541 |
-
|
542 |
-
|
|
|
543 |
|
544 |
-
|
545 |
|
546 |
-
|
547 |
|
548 |
-
|
549 |
|
550 |
-
|
551 |
|
552 |
-
|
553 |
|
554 |
-
|
555 |
|
556 |
-
|
557 |
-
}
|
558 |
}
|
559 |
}
|
560 |
|
@@ -574,7 +612,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
574 |
public function disable_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) {
|
575 |
|
576 |
$current_user_id = get_current_user_id();
|
577 |
-
if ( Wp_Temporary_Login_Without_Password_Common::is_valid_temporary_login( $current_user_id ) && (
|
578 |
unset( $actions['deactivate'] );
|
579 |
echo "<script> jQuery(document).ready(function() { jQuery('table.plugins tbody#the-list tr[data-slug=temporary-login-without-password] th.check-column input').attr('disabled', true); }); </script>";
|
580 |
}
|
95 |
$wtlwp_generated_url = ! empty( $_REQUEST['wtlwp_generated_url'] ) ? $_REQUEST['wtlwp_generated_url'] : '';
|
96 |
$user_email = ! empty( $_REQUEST['user_email'] ) ? $_REQUEST['user_email'] : '';
|
97 |
$tlwp_settings = maybe_unserialize( get_option( 'tlwp_settings', array() ) );
|
98 |
+
$action = ! empty( $_GET['action'] ) ? $_GET['action'] : '';
|
99 |
+
$user_id = ! empty( $_GET['user_id'] ) ? $_GET['user_id'] : '';
|
100 |
+
$do_update = ( 'update' === $action ) ? 1 : 0;
|
101 |
|
102 |
+
if ( ! empty( $user_id ) ) {
|
103 |
+
$temporary_user_data = Wp_Temporary_Login_Without_Password_Common::get_temporary_logins_data( $user_id );
|
104 |
+
}
|
105 |
+
|
106 |
+
$default_role = ( ! empty( $tlwp_settings ) && isset( $tlwp_settings['default_role'] ) ) ? $tlwp_settings['default_role'] : 'administrator';
|
107 |
$visible_roles = ( ! empty( $tlwp_settings ) && isset( $tlwp_settings['visible_roles'] ) ) ? $tlwp_settings['visible_roles'] : '';
|
108 |
|
109 |
include $_template_file;
|
116 |
*/
|
117 |
public function create_user() {
|
118 |
|
119 |
+
|
120 |
+
if ( empty( $_POST['wtlwp_data'] ) || empty( $_POST['wtlwp-nonce'] ) || ( ! empty( $_POST['wtlwp_action'] ) && $_POST['wtlwp_action'] === 'update' ) ) {
|
121 |
return;
|
122 |
}
|
123 |
|
124 |
$data = $_POST['wtlwp_data'];
|
125 |
$email = $data['user_email'];
|
126 |
+
$error = true;
|
127 |
$result = array();
|
128 |
|
129 |
$redirect_link = '';
|
132 |
'status' => 'error',
|
133 |
'message' => 'unathorised_access',
|
134 |
);
|
|
|
135 |
} elseif ( ! wp_verify_nonce( $_POST['wtlwp-nonce'], 'wtlwp_generate_login_url' ) ) {
|
136 |
$result = array(
|
137 |
'status' => 'error',
|
138 |
'message' => 'nonce_failed',
|
139 |
);
|
|
|
140 |
} elseif ( empty( $data['user_email'] ) ) {
|
141 |
$result = array(
|
142 |
'status' => 'error',
|
143 |
'message' => 'empty_email',
|
144 |
);
|
|
|
145 |
} elseif ( ! is_email( $email ) ) {
|
146 |
$result = array(
|
147 |
'status' => 'error',
|
148 |
'message' => 'not_valid_email',
|
149 |
);
|
|
|
150 |
} elseif ( ! empty( $data['user_email'] ) && email_exists( $data['user_email'] ) ) {
|
151 |
$result = array(
|
152 |
'status' => 'error',
|
153 |
'message' => 'email_is_in_use',
|
154 |
);
|
155 |
+
} else {
|
156 |
+
$error = false;
|
157 |
}
|
158 |
|
159 |
if ( ! $error ) {
|
195 |
|
196 |
$data = $_POST['tlwp_settings_data'];
|
197 |
|
198 |
+
$default_role = isset( $data['default_role'] ) ? $data['default_role'] : 'administrator';
|
199 |
$visible_roles = isset( $data['visible_roles'] ) ? $data['visible_roles'] : array();
|
200 |
|
201 |
if ( ! in_array( $default_role, $visible_roles ) ) {
|
203 |
}
|
204 |
|
205 |
$tlwp_settings = array(
|
206 |
+
'default_role' => $default_role,
|
207 |
'visible_roles' => $visible_roles,
|
208 |
);
|
209 |
|
245 |
'disable',
|
246 |
'enable',
|
247 |
'delete',
|
248 |
+
'update'
|
249 |
);
|
250 |
|
251 |
if ( ! in_array( $action, $valid_actions ) ) {
|
280 |
}
|
281 |
|
282 |
if ( ! $error ) {
|
283 |
+
if ( 'disable' === $action ) {
|
284 |
$disable_login = Wp_Temporary_Login_Without_Password_Common::manage_login( absint( $user_id ), 'disable' );
|
285 |
if ( $disable_login ) {
|
286 |
$result = array(
|
293 |
'message' => 'default_error_message',
|
294 |
);
|
295 |
}
|
296 |
+
} elseif ( 'enable' === $action ) {
|
297 |
$enable_login = Wp_Temporary_Login_Without_Password_Common::manage_login( absint( $user_id ), 'enable' );
|
298 |
|
299 |
if ( $enable_login ) {
|
307 |
'message' => 'default_error_message',
|
308 |
);
|
309 |
}
|
310 |
+
} elseif ( 'delete' === $action ) {
|
311 |
$delete_user = wp_delete_user( $user_id, get_current_user_id() );
|
312 |
|
313 |
// delete user from Multisite network too!
|
332 |
'message' => 'default_error_message',
|
333 |
);
|
334 |
}
|
335 |
+
|
336 |
+
} else if ( 'update' === $action ) {
|
337 |
+
|
338 |
+
$data = ! empty( $_POST['wtlwp_data'] ) ? $_POST['wtlwp_data'] : array();
|
339 |
+
|
340 |
+
$user_id = ! empty( $data['user_id'] ) ? $data['user_id'] : 0;
|
341 |
+
|
342 |
+
$update = Wp_Temporary_Login_Without_Password_Common::update_user( $user_id, $data );
|
343 |
+
|
344 |
+
if ( $update ) {
|
345 |
+
$result = array(
|
346 |
+
'status' => 'success',
|
347 |
+
'message' => 'user_updated',
|
348 |
+
);
|
349 |
+
} else {
|
350 |
+
$result = array(
|
351 |
+
'status' => 'error',
|
352 |
+
'message' => 'default_error_message',
|
353 |
+
);
|
354 |
+
}
|
355 |
+
|
356 |
+
|
357 |
} else {
|
358 |
$result = array(
|
359 |
'status' => 'error',
|
374 |
*/
|
375 |
public function display_admin_notices() {
|
376 |
|
377 |
+
if ( empty( $_REQUEST['page'] ) || ( empty( $_REQUEST['page'] ) && 'wp-temporary-login-without-password' !== $_REQUEST['page'] ) || ! isset( $_REQUEST['wtlwp_message'] ) || ( ! isset( $_REQUEST['wtlwp_error'] ) && ! isset( $_REQUEST['wtlwp_success'] ) ) ) {
|
378 |
return;
|
379 |
}
|
380 |
|
428 |
case 'user_created':
|
429 |
$message = __( 'Login created successfully!', 'temporary-login-without-password' );
|
430 |
break;
|
431 |
+
case 'user_updated':
|
432 |
+
$message = __( 'Login updated successfully!', 'temporary-login-without-password' );
|
433 |
+
break;
|
434 |
|
435 |
case 'user_deleted':
|
436 |
$message = __( 'Login deleted successfully!', 'temporary-login-without-password' );
|
448 |
$message = __( 'Settings have been updated successfully', 'temporary-login-without-password' );
|
449 |
break;
|
450 |
|
451 |
+
|
452 |
default:
|
453 |
$message = __( 'Success!', 'temporary-login-without-password' );
|
454 |
break;
|
519 |
* Triggered when clicking the rating footer.
|
520 |
*/
|
521 |
public static function tlwp_rated() {
|
522 |
+
$current_user_id = get_current_user_id();
|
523 |
+
update_user_meta( $current_user_id, 'tlwp_admin_footer_text_rated', 1 );
|
524 |
+
update_user_meta( $current_user_id, 'tlwp_review_time', time() );
|
525 |
+
update_user_meta( $current_user_id, 'tlwp_review_from', 'footer' );
|
526 |
wp_die();
|
527 |
}
|
528 |
|
530 |
* Triggered when clicking the rating link from header.
|
531 |
*/
|
532 |
public static function tlwp_reivew_header() {
|
533 |
+
$current_user_id = get_current_user_id();
|
534 |
+
update_user_meta( $current_user_id, 'tlwp_admin_header_text_rated', 1 );
|
535 |
+
update_user_meta( $current_user_id, 'tlwp_review_time', time() );
|
536 |
+
update_user_meta( $current_user_id, 'tlwp_review_from', 'header' );
|
537 |
wp_die();
|
538 |
}
|
539 |
|
544 |
*/
|
545 |
public static function can_ask_for_review() {
|
546 |
|
547 |
+
$current_user_id = get_current_user_id();
|
548 |
+
|
549 |
+
$tlwp_nobug = get_user_meta( $current_user_id, 'tlwp_no_bug', true );
|
550 |
+
$tlwp_rated = get_user_meta( $current_user_id, 'tlwp_admin_footer_text_rated', true );
|
551 |
+
$tlwp_rated_header = get_user_meta( $current_user_id, 'tlwp_admin_header_text_rated', true );
|
552 |
|
553 |
$temporary_logins = Wp_Temporary_Login_Without_Password_Common::get_temporary_logins();
|
554 |
$total_logins = count( $temporary_logins );
|
567 |
*/
|
568 |
public function tlwp_ask_user_for_review() {
|
569 |
|
570 |
+
$current_user_id = get_current_user_id();
|
|
|
|
|
571 |
|
572 |
+
$nobug = '';
|
573 |
|
574 |
+
if ( isset( $_GET['tlwpnobug'] ) ) {
|
575 |
+
$nobug = absint( esc_attr( wp_unslash( $_GET['tlwpnobug'] ) ) );
|
576 |
+
}
|
577 |
|
578 |
+
if ( 1 === $nobug ) {
|
579 |
+
update_user_meta( $current_user_id, 'tlwp_no_bug', 1 );
|
580 |
+
update_user_meta( $current_user_id, 'tlwp_no_bug_time', time() );
|
581 |
+
}
|
582 |
|
583 |
+
$can_ask_for_review = self::can_ask_for_review();
|
584 |
|
585 |
+
if ( $can_ask_for_review ) {
|
586 |
|
587 |
+
$reviewurl = 'https://wordpress.org/support/plugin/temporary-login-without-password/reviews/';
|
588 |
|
589 |
+
$nobugurl = add_query_arg( 'tlwpnobug', 1, menu_page_url( 'wp-temporary-login-without-password', false ) );
|
590 |
|
591 |
+
echo '<div class="notice notice-warning">';
|
592 |
|
593 |
+
echo sprintf( __( '<p>You have been using <b>Temporary Login Without Password</b> plugin, do you like it? If so, please leave us a review with your feedback! <a href="%s" class="tlwp-rating-link-header" target="_blank" data-rated="' . esc_attr__( 'Thank You :) ', 'temporary-login-without-password' ) . '">Leave A Review</a> <a href="%s">No, Thanks</a></p>' ), $reviewurl, $nobugurl );
|
594 |
|
595 |
+
echo '</div>';
|
|
|
596 |
}
|
597 |
}
|
598 |
|
612 |
public function disable_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) {
|
613 |
|
614 |
$current_user_id = get_current_user_id();
|
615 |
+
if ( Wp_Temporary_Login_Without_Password_Common::is_valid_temporary_login( $current_user_id ) && ( 'temporary-login-without-password/temporary-login-without-password.php' === $plugin_file ) ) {
|
616 |
unset( $actions['deactivate'] );
|
617 |
echo "<script> jQuery(document).ready(function() { jQuery('table.plugins tbody#the-list tr[data-slug=temporary-login-without-password] th.check-column input').attr('disabled', true); }); </script>";
|
618 |
}
|
admin/css/wp-temporary-login-without-password-admin.css
CHANGED
@@ -1,100 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.new-wtlwp-form {
|
2 |
-
|
3 |
-
padding: 10px;
|
4 |
-
background-color: white;
|
5 |
-
display: none;
|
6 |
}
|
7 |
|
8 |
.wtlwp-form-input {
|
9 |
-
|
10 |
}
|
11 |
|
12 |
.widefat .wtlwp-status {
|
13 |
-
|
14 |
}
|
15 |
|
16 |
.wtlwp-status-active {
|
17 |
-
|
18 |
}
|
19 |
|
20 |
.wtlwp-status-expired {
|
21 |
-
|
22 |
}
|
23 |
|
24 |
.wtlwp-status:after {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
}
|
36 |
|
37 |
.wtlwp-status-active:after {
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
|
42 |
.wtlwp-status-expired:after {
|
43 |
-
|
44 |
-
|
45 |
}
|
46 |
|
47 |
-
.cancel-new-login-form {
|
48 |
-
|
49 |
}
|
50 |
|
51 |
.wtlwp-wide-input {
|
52 |
-
|
53 |
}
|
54 |
|
55 |
.generated-wtlwp-login-link {
|
56 |
-
|
57 |
-
|
58 |
}
|
59 |
|
60 |
.wtlwp-form-row {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
.wtlwp-form-submit-button {
|
65 |
-
|
66 |
}
|
67 |
|
68 |
.wtlwp-user-login {
|
69 |
-
|
70 |
}
|
71 |
|
72 |
.wtlwp-copy-to-clipboard, .wtlwp-click-to-copy-btn {
|
73 |
-
|
74 |
}
|
75 |
|
76 |
.wtlwp-copy-to-clipboard:hover {
|
77 |
-
|
78 |
}
|
79 |
|
80 |
.copied-text-message {
|
81 |
-
|
82 |
}
|
83 |
|
84 |
.wtlp-role-radio, .wtlp-role-checkbox {
|
85 |
-
|
86 |
-
|
87 |
}
|
88 |
|
89 |
.tlwp-role-name {
|
90 |
-
|
91 |
}
|
92 |
|
93 |
.visible-roles-dropdown {
|
94 |
-
|
95 |
-
|
96 |
}
|
97 |
|
98 |
.default-role-dropdown {
|
99 |
-
|
100 |
}
|
1 |
+
.new-wtlwp-form, .update-wtlwp-form {
|
2 |
+
border: 1px solid;
|
3 |
+
padding: 10px;
|
4 |
+
background-color: white;
|
5 |
+
}
|
6 |
+
|
7 |
.new-wtlwp-form {
|
8 |
+
display: none;
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
.wtlwp-form-input {
|
12 |
+
width: 300px !important;
|
13 |
}
|
14 |
|
15 |
.widefat .wtlwp-status {
|
16 |
+
width: 40px;
|
17 |
}
|
18 |
|
19 |
.wtlwp-status-active {
|
20 |
+
color: #008000 !important;
|
21 |
}
|
22 |
|
23 |
.wtlwp-status-expired {
|
24 |
+
color: #FF0000 !important;
|
25 |
}
|
26 |
|
27 |
.wtlwp-status:after {
|
28 |
+
border-radius: 32px;
|
29 |
+
color: #fff;
|
30 |
+
display: block;
|
31 |
+
font-size: 11px;
|
32 |
+
font-weight: bold;
|
33 |
+
height: 16px;
|
34 |
+
line-height: 17px;
|
35 |
+
margin-left: 8px;
|
36 |
+
text-align: center;
|
37 |
+
width: 16px;
|
38 |
}
|
39 |
|
40 |
.wtlwp-status-active:after {
|
41 |
+
background: #008000 none repeat scroll 0 0;
|
42 |
+
content: "";
|
43 |
}
|
44 |
|
45 |
.wtlwp-status-expired:after {
|
46 |
+
background: #FF0000 none repeat scroll 0 0;
|
47 |
+
content: "";
|
48 |
}
|
49 |
|
50 |
+
.cancel-new-login-form, .cancel-update-login-form {
|
51 |
+
cursor: pointer;
|
52 |
}
|
53 |
|
54 |
.wtlwp-wide-input {
|
55 |
+
width: 60%;
|
56 |
}
|
57 |
|
58 |
.generated-wtlwp-login-link {
|
59 |
+
border: 1px solid;
|
60 |
+
padding: 10px 10px 10px 10px;
|
61 |
}
|
62 |
|
63 |
.wtlwp-form-row {
|
64 |
+
padding-left: 20px !important;
|
65 |
}
|
66 |
|
67 |
.wtlwp-form-submit-button {
|
68 |
+
width: 115px;
|
69 |
}
|
70 |
|
71 |
.wtlwp-user-login {
|
72 |
+
font-size: 12px;
|
73 |
}
|
74 |
|
75 |
.wtlwp-copy-to-clipboard, .wtlwp-click-to-copy-btn {
|
76 |
+
cursor: pointer;
|
77 |
}
|
78 |
|
79 |
.wtlwp-copy-to-clipboard:hover {
|
80 |
+
color: #0073aa;
|
81 |
}
|
82 |
|
83 |
.copied-text-message {
|
84 |
+
padding: 20px;
|
85 |
}
|
86 |
|
87 |
.wtlp-role-radio, .wtlp-role-checkbox {
|
88 |
+
text-align: center;
|
89 |
+
padding-top: 10px;
|
90 |
}
|
91 |
|
92 |
.tlwp-role-name {
|
93 |
+
padding-top: 10px;
|
94 |
}
|
95 |
|
96 |
.visible-roles-dropdown {
|
97 |
+
min-height: 100px !important;
|
98 |
+
width: 200px;
|
99 |
}
|
100 |
|
101 |
.default-role-dropdown {
|
102 |
+
width: 200px;
|
103 |
}
|
admin/js/wp-temporary-login-without-password-admin.js
CHANGED
@@ -5,10 +5,16 @@
|
|
5 |
|
6 |
jQuery('#add-new-wtlwp-form-button').click(function () {
|
7 |
jQuery('#new-wtlwp-form').show();
|
|
|
8 |
});
|
9 |
|
10 |
jQuery('#cancel-new-login-form').click(function () {
|
11 |
jQuery('#new-wtlwp-form').hide();
|
|
|
|
|
|
|
|
|
|
|
12 |
});
|
13 |
|
14 |
if (jQuery('.wtlwp-click-to-copy-btn').get(0)) {
|
5 |
|
6 |
jQuery('#add-new-wtlwp-form-button').click(function () {
|
7 |
jQuery('#new-wtlwp-form').show();
|
8 |
+
jQuery('#update-wtlwp-form').hide();
|
9 |
});
|
10 |
|
11 |
jQuery('#cancel-new-login-form').click(function () {
|
12 |
jQuery('#new-wtlwp-form').hide();
|
13 |
+
jQuery('#update-wtlwp-form').show();
|
14 |
+
});
|
15 |
+
|
16 |
+
jQuery('#cancel-update-login-form').click(function () {
|
17 |
+
jQuery('#update-wtlwp-form').hide();
|
18 |
});
|
19 |
|
20 |
if (jQuery('.wtlwp-click-to-copy-btn').get(0)) {
|
includes/class-wp-temporary-login-without-password-common.php
CHANGED
@@ -94,6 +94,57 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
94 |
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
/**
|
98 |
* get the expiry duration
|
99 |
*
|
@@ -104,10 +155,10 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
104 |
public static function get_expiry_options( $key = '' ) {
|
105 |
|
106 |
$expiry_duration = array(
|
107 |
-
'3_days' => __( 'Three Days', 'temporary-login-without-password' ),
|
108 |
-
'day' => __( 'One Day', 'temporary-login-without-password' ),
|
109 |
-
'3_hours' => __( 'Three Hours', 'temporary-login-without-password' ),
|
110 |
'hour' => __( 'One Hour', 'temporary-login-without-password' ),
|
|
|
|
|
|
|
111 |
'week' => __( 'One Week', 'temporary-login-without-password' ),
|
112 |
'month' => __( 'One Month', 'temporary-login-without-password' ),
|
113 |
'custom_date' => __( 'Custom Date', 'temporary-login-without-password' ),
|
@@ -192,11 +243,27 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
192 |
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
public static function get_current_gmt_timestamp() {
|
196 |
return strtotime( gmdate( 'Y-m-d H:i:s', time() ) );
|
197 |
|
198 |
}
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
public static function get_temporary_logins( $role = '' ) {
|
201 |
|
202 |
$args = array(
|
@@ -227,6 +294,16 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
227 |
|
228 |
}
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
public static function format_date_display( $stamp = 0, $type = 'date_format' ) {
|
231 |
|
232 |
$type_format = 'date_format';
|
@@ -250,6 +327,15 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
250 |
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
public static function get_redirect_link( $result = array() ) {
|
254 |
|
255 |
if ( empty( $result ) ) {
|
@@ -309,6 +395,15 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
309 |
|
310 |
}
|
311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
public static function is_login_expired( $user_id = 0 ) {
|
313 |
|
314 |
if ( empty( $user_id ) ) {
|
@@ -325,6 +420,15 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
325 |
|
326 |
}
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
public static function generate_wtlwp_token( $user_id ) {
|
329 |
$str = $user_id . time() . uniqid( '', true );
|
330 |
|
@@ -332,6 +436,16 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
332 |
|
333 |
}
|
334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
public static function get_valid_user_based_on_wtlwp_token( $token = '', $fields = 'all' ) {
|
336 |
if ( empty( $token ) ) {
|
337 |
return false;
|
@@ -372,7 +486,7 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
372 |
/**
|
373 |
* Checks whether user is valid temporary user
|
374 |
*
|
375 |
-
* @param int
|
376 |
* @param bool $check_expiry
|
377 |
*
|
378 |
* @return bool
|
@@ -396,8 +510,10 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
396 |
/**
|
397 |
* Get temporary login manage url
|
398 |
*
|
|
|
|
|
399 |
* @param $user_id
|
400 |
-
* @param string
|
401 |
*
|
402 |
* @return string
|
403 |
*/
|
@@ -429,6 +545,12 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
429 |
'user_id' => $user_id,
|
430 |
);
|
431 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
default:
|
433 |
break;
|
434 |
}
|
@@ -446,6 +568,8 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
446 |
/**
|
447 |
* Get temporary login url
|
448 |
*
|
|
|
|
|
449 |
* @param $user_id
|
450 |
*
|
451 |
* @return string
|
@@ -475,7 +599,9 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
475 |
/**
|
476 |
* Manage temporary logins
|
477 |
*
|
478 |
-
* @
|
|
|
|
|
479 |
* @param string $action
|
480 |
*
|
481 |
* @return bool
|
@@ -509,7 +635,9 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
509 |
/**
|
510 |
* Get the redable time elapsed string
|
511 |
*
|
512 |
-
* @
|
|
|
|
|
513 |
* @param bool $ago
|
514 |
*
|
515 |
* @return string
|
@@ -565,6 +693,8 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
565 |
/**
|
566 |
* Get all pages which needs to be blocked for temporary users
|
567 |
*
|
|
|
|
|
568 |
* @return array
|
569 |
*/
|
570 |
public static function get_blocked_pages() {
|
@@ -577,6 +707,8 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
577 |
|
578 |
/**
|
579 |
* Delete all temporary logins
|
|
|
|
|
580 |
*/
|
581 |
public static function delete_temporary_logins() {
|
582 |
|
@@ -607,7 +739,7 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
607 |
foreach ( $editable_roles as $role => $details ) {
|
608 |
$name = translate_user_role( $details['name'] );
|
609 |
// preselect specified role
|
610 |
-
if ( count($selected_roles ) > 0 && in_array( $role, $selected_roles ) ) {
|
611 |
$r .= "\n\t<option selected='selected' value='" . esc_attr( $role ) . "'>$name</option>";
|
612 |
} else {
|
613 |
$r .= "\n\t<option value='" . esc_attr( $role ) . "'>$name</option>";
|
@@ -617,6 +749,53 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
617 |
echo $r;
|
618 |
}
|
619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
/**
|
621 |
* Print out option html elements for role selectors.
|
622 |
*
|
94 |
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* update user
|
99 |
+
*
|
100 |
+
* @param array $data
|
101 |
+
*
|
102 |
+
* @return array|int|WP_Error
|
103 |
+
*/
|
104 |
+
public static function update_user( $user_id = 0, $data ) {
|
105 |
+
|
106 |
+
if ( false === Wp_Temporary_Login_Without_Password_Common::can_manage_wtlwp() || ( 0 === $user_id ) ) {
|
107 |
+
return 0;
|
108 |
+
}
|
109 |
+
|
110 |
+
$expiry_option = ! empty( $data['expiry'] ) ? $data['expiry'] : 'day';
|
111 |
+
$date = ! empty( $data['custom_date'] ) ? $data['custom_date'] : '';
|
112 |
+
|
113 |
+
$first_name = isset( $data['user_first_name'] ) ? sanitize_text_field( $data['user_first_name'] ) : '';
|
114 |
+
$last_name = isset( $data['user_last_name'] ) ? sanitize_text_field( $data['user_last_name'] ) : '';
|
115 |
+
$role = ! empty( $data['role'] ) ? $data['role'] : 'subscriber';
|
116 |
+
$user_args = array(
|
117 |
+
'first_name' => $first_name,
|
118 |
+
'last_name' => $last_name,
|
119 |
+
'role' => $role,
|
120 |
+
'ID' => $user_id //require for update_user
|
121 |
+
);
|
122 |
+
|
123 |
+
$user_id = wp_update_user( $user_args );
|
124 |
+
|
125 |
+
if ( is_wp_error( $user_id ) ) {
|
126 |
+
$code = $user_id->get_error_code();
|
127 |
+
|
128 |
+
return array(
|
129 |
+
'error' => true,
|
130 |
+
'errcode' => $code,
|
131 |
+
'message' => $user_id->get_error_message( $code ),
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
|
136 |
+
if ( is_multisite() && ! empty( $data['super_admin'] ) && $data['super_admin'] === 'on' ) {
|
137 |
+
grant_super_admin( $user_id );
|
138 |
+
}
|
139 |
+
|
140 |
+
update_user_meta( $user_id, '_wtlwp_updated', Wp_Temporary_Login_Without_Password_Common::get_current_gmt_timestamp() );
|
141 |
+
update_user_meta( $user_id, '_wtlwp_expire', Wp_Temporary_Login_Without_Password_Common::get_user_expire_time( $expiry_option, $date ) );
|
142 |
+
|
143 |
+
return $user_id;
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
/**
|
149 |
* get the expiry duration
|
150 |
*
|
155 |
public static function get_expiry_options( $key = '' ) {
|
156 |
|
157 |
$expiry_duration = array(
|
|
|
|
|
|
|
158 |
'hour' => __( 'One Hour', 'temporary-login-without-password' ),
|
159 |
+
'3_hours' => __( 'Three Hours', 'temporary-login-without-password' ),
|
160 |
+
'day' => __( 'One Day', 'temporary-login-without-password' ),
|
161 |
+
'3_days' => __( 'Three Days', 'temporary-login-without-password' ),
|
162 |
'week' => __( 'One Week', 'temporary-login-without-password' ),
|
163 |
'month' => __( 'One Month', 'temporary-login-without-password' ),
|
164 |
'custom_date' => __( 'Custom Date', 'temporary-login-without-password' ),
|
243 |
|
244 |
}
|
245 |
|
246 |
+
/**
|
247 |
+
* Get current GMT date time
|
248 |
+
*
|
249 |
+
* @since 1.0
|
250 |
+
*
|
251 |
+
* @return false|int
|
252 |
+
*/
|
253 |
public static function get_current_gmt_timestamp() {
|
254 |
return strtotime( gmdate( 'Y-m-d H:i:s', time() ) );
|
255 |
|
256 |
}
|
257 |
|
258 |
+
/**
|
259 |
+
* Get Temporary Logins
|
260 |
+
*
|
261 |
+
* @since 1.0
|
262 |
+
*
|
263 |
+
* @param string $role
|
264 |
+
*
|
265 |
+
* @return array|bool
|
266 |
+
*/
|
267 |
public static function get_temporary_logins( $role = '' ) {
|
268 |
|
269 |
$args = array(
|
294 |
|
295 |
}
|
296 |
|
297 |
+
/**
|
298 |
+
* Format time string
|
299 |
+
*
|
300 |
+
* @since 1.0
|
301 |
+
*
|
302 |
+
* @param int $stamp
|
303 |
+
* @param string $type
|
304 |
+
*
|
305 |
+
* @return false|string
|
306 |
+
*/
|
307 |
public static function format_date_display( $stamp = 0, $type = 'date_format' ) {
|
308 |
|
309 |
$type_format = 'date_format';
|
327 |
|
328 |
}
|
329 |
|
330 |
+
/**
|
331 |
+
* Get Redirection link
|
332 |
+
*
|
333 |
+
* @since 1.0
|
334 |
+
*
|
335 |
+
* @param array $result
|
336 |
+
*
|
337 |
+
* @return bool|string
|
338 |
+
*/
|
339 |
public static function get_redirect_link( $result = array() ) {
|
340 |
|
341 |
if ( empty( $result ) ) {
|
395 |
|
396 |
}
|
397 |
|
398 |
+
/**
|
399 |
+
* Check if temporary login expired
|
400 |
+
*
|
401 |
+
* @since 1.0
|
402 |
+
*
|
403 |
+
* @param int $user_id
|
404 |
+
*
|
405 |
+
* @return bool
|
406 |
+
*/
|
407 |
public static function is_login_expired( $user_id = 0 ) {
|
408 |
|
409 |
if ( empty( $user_id ) ) {
|
420 |
|
421 |
}
|
422 |
|
423 |
+
/**
|
424 |
+
* Generate Temporary Login Token
|
425 |
+
*
|
426 |
+
* @since 1.0
|
427 |
+
*
|
428 |
+
* @param $user_id
|
429 |
+
*
|
430 |
+
* @return string
|
431 |
+
*/
|
432 |
public static function generate_wtlwp_token( $user_id ) {
|
433 |
$str = $user_id . time() . uniqid( '', true );
|
434 |
|
436 |
|
437 |
}
|
438 |
|
439 |
+
/**
|
440 |
+
* Get valid temporary user based on token
|
441 |
+
*
|
442 |
+
* @since 1.0
|
443 |
+
*
|
444 |
+
* @param string $token
|
445 |
+
* @param string $fields
|
446 |
+
*
|
447 |
+
* @return array|bool
|
448 |
+
*/
|
449 |
public static function get_valid_user_based_on_wtlwp_token( $token = '', $fields = 'all' ) {
|
450 |
if ( empty( $token ) ) {
|
451 |
return false;
|
486 |
/**
|
487 |
* Checks whether user is valid temporary user
|
488 |
*
|
489 |
+
* @param int $user_id
|
490 |
* @param bool $check_expiry
|
491 |
*
|
492 |
* @return bool
|
510 |
/**
|
511 |
* Get temporary login manage url
|
512 |
*
|
513 |
+
* @since 1.0
|
514 |
+
*
|
515 |
* @param $user_id
|
516 |
+
* @param string $action
|
517 |
*
|
518 |
* @return string
|
519 |
*/
|
545 |
'user_id' => $user_id,
|
546 |
);
|
547 |
break;
|
548 |
+
case 'update';
|
549 |
+
$args = array(
|
550 |
+
'wtlwp_action' => 'update',
|
551 |
+
'user_id' => $user_id,
|
552 |
+
);
|
553 |
+
break;
|
554 |
default:
|
555 |
break;
|
556 |
}
|
568 |
/**
|
569 |
* Get temporary login url
|
570 |
*
|
571 |
+
* @since 1.0
|
572 |
+
*
|
573 |
* @param $user_id
|
574 |
*
|
575 |
* @return string
|
599 |
/**
|
600 |
* Manage temporary logins
|
601 |
*
|
602 |
+
* @since 1.0
|
603 |
+
*
|
604 |
+
* @param int $user_id
|
605 |
* @param string $action
|
606 |
*
|
607 |
* @return bool
|
635 |
/**
|
636 |
* Get the redable time elapsed string
|
637 |
*
|
638 |
+
* @since 1.0
|
639 |
+
*
|
640 |
+
* @param int $time
|
641 |
* @param bool $ago
|
642 |
*
|
643 |
* @return string
|
693 |
/**
|
694 |
* Get all pages which needs to be blocked for temporary users
|
695 |
*
|
696 |
+
* @since 1.0
|
697 |
+
*
|
698 |
* @return array
|
699 |
*/
|
700 |
public static function get_blocked_pages() {
|
707 |
|
708 |
/**
|
709 |
* Delete all temporary logins
|
710 |
+
*
|
711 |
+
* @since 1.0
|
712 |
*/
|
713 |
public static function delete_temporary_logins() {
|
714 |
|
739 |
foreach ( $editable_roles as $role => $details ) {
|
740 |
$name = translate_user_role( $details['name'] );
|
741 |
// preselect specified role
|
742 |
+
if ( count( $selected_roles ) > 0 && in_array( $role, $selected_roles ) ) {
|
743 |
$r .= "\n\t<option selected='selected' value='" . esc_attr( $role ) . "'>$name</option>";
|
744 |
} else {
|
745 |
$r .= "\n\t<option value='" . esc_attr( $role ) . "'>$name</option>";
|
749 |
echo $r;
|
750 |
}
|
751 |
|
752 |
+
/**
|
753 |
+
* Get temporary_user details.
|
754 |
+
*
|
755 |
+
* @param int $user_id
|
756 |
+
*
|
757 |
+
* @since 1.5.3
|
758 |
+
*
|
759 |
+
* @return array
|
760 |
+
*/
|
761 |
+
public static function get_temporary_logins_data( $user_id = 0 ) {
|
762 |
+
|
763 |
+
$user_data = array();
|
764 |
+
if ( $user_id ) {
|
765 |
+
|
766 |
+
$is_tlwp_user = get_user_meta( $user_id, '_wtlwp_user', true );
|
767 |
+
|
768 |
+
if ( $is_tlwp_user ) {
|
769 |
+
|
770 |
+
$temporary_user_info = get_userdata( $user_id );
|
771 |
+
|
772 |
+
$email = $temporary_user_info->user_email;
|
773 |
+
$first_name = $temporary_user_info->first_name;
|
774 |
+
$last_name = $temporary_user_info->last_name;
|
775 |
+
$role = array_shift( $temporary_user_info->roles );
|
776 |
+
|
777 |
+
$created_on = get_user_meta( $user_id, '_wtlwp_created', true );
|
778 |
+
$expire_on = get_user_meta( $user_id, '_wtlwp_expire', true );
|
779 |
+
$wtlwp_token = get_user_meta( $user_id, '_wtlwp_token', true );
|
780 |
+
|
781 |
+
$user_data = array(
|
782 |
+
'is_tlwp_user' => $is_tlwp_user,
|
783 |
+
'email' => $email,
|
784 |
+
'first_name' => $first_name,
|
785 |
+
'last_name' => $last_name,
|
786 |
+
'created_on' => $created_on,
|
787 |
+
'expire_on' => $expire_on,
|
788 |
+
'wtlwp_token' => $wtlwp_token,
|
789 |
+
'role' => $role
|
790 |
+
);
|
791 |
+
}
|
792 |
+
|
793 |
+
}
|
794 |
+
|
795 |
+
return $user_data;
|
796 |
+
|
797 |
+
}
|
798 |
+
|
799 |
/**
|
800 |
* Print out option html elements for role selectors.
|
801 |
*
|
includes/class-wp-temporary-login-without-password-layout.php
CHANGED
@@ -131,6 +131,7 @@ class Wp_Temporary_Login_Without_Password_Layout {
|
|
131 |
$user_id = $user->ID;
|
132 |
|
133 |
$delete_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'delete' );
|
|
|
134 |
$disable_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'disable' );
|
135 |
$enable_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'enable' );
|
136 |
|
@@ -141,6 +142,7 @@ class Wp_Temporary_Login_Without_Password_Layout {
|
|
141 |
}
|
142 |
|
143 |
$action_row .= '<span class="delete"><a title="' . __( 'Delete', 'temporary-login-without-password' ) . '" href="' . $delete_login_url . '"><span class="dashicons dashicons-no"></span></a></span>';
|
|
|
144 |
$action_row .= '<span class="copy"><span id="text-' . $user->ID . '" class="dashicons dashicons-admin-links wtlwp-copy-to-clipboard" title="' . __( 'Copy login link', 'temporary-login-without-password' ) . '" data-clipboard-text="' . Wp_Temporary_Login_Without_Password_Common::get_login_url( $user->ID ) . '"></span></span>';
|
145 |
$action_row .= '<span id="copied-text-' . $user->ID . '" class="copied-text-message"></span>';
|
146 |
$action_row .= '</div>';
|
131 |
$user_id = $user->ID;
|
132 |
|
133 |
$delete_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'delete' );
|
134 |
+
$update_login_url = add_query_arg( array('page' => 'wp-temporary-login-without-password', 'user_id' => $user_id, 'action' => 'update'), admin_url( 'users.php'));
|
135 |
$disable_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'disable' );
|
136 |
$enable_login_url = Wp_Temporary_Login_Without_Password_Common::get_manage_login_url( $user_id, 'enable' );
|
137 |
|
142 |
}
|
143 |
|
144 |
$action_row .= '<span class="delete"><a title="' . __( 'Delete', 'temporary-login-without-password' ) . '" href="' . $delete_login_url . '"><span class="dashicons dashicons-no"></span></a></span>';
|
145 |
+
$action_row .= '<span class="edit"><a title="' . __( 'Edit', 'temporary-login-without-password' ) . '" href="' . $update_login_url . '"><span class="dashicons dashicons-edit"></span></a></span>';
|
146 |
$action_row .= '<span class="copy"><span id="text-' . $user->ID . '" class="dashicons dashicons-admin-links wtlwp-copy-to-clipboard" title="' . __( 'Copy login link', 'temporary-login-without-password' ) . '" data-clipboard-text="' . Wp_Temporary_Login_Without_Password_Common::get_login_url( $user->ID ) . '"></span></span>';
|
147 |
$action_row .= '<span id="copied-text-' . $user->ID . '" class="copied-text-message"></span>';
|
148 |
$action_row .= '</div>';
|
includes/class-wp-temporary-login-without-password.php
CHANGED
@@ -9,7 +9,7 @@ class Wp_Temporary_Login_Without_Password {
|
|
9 |
public function __construct() {
|
10 |
|
11 |
$this->plugin_name = 'temporary-login-without-password';
|
12 |
-
$this->version = '1.5.
|
13 |
|
14 |
$this->load_dependencies();
|
15 |
$this->set_locale();
|
9 |
public function __construct() {
|
10 |
|
11 |
$this->plugin_name = 'temporary-login-without-password';
|
12 |
+
$this->version = '1.5.3';
|
13 |
|
14 |
$this->load_dependencies();
|
15 |
$this->set_locale();
|
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-
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
@@ -16,120 +16,124 @@ msgstr ""
|
|
16 |
|
17 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:80
|
18 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:80
|
19 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
20 |
msgid "Temporary Logins"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
24 |
msgid "User creation failed"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
28 |
msgid "You do not have permission to create a temporary login"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
32 |
msgid "Email already is in use"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
36 |
msgid "Please enter valid email address. Email field should not be empty"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
40 |
msgid "Please enter valid email address"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
44 |
msgid "User you are trying to delete is not temporary"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
48 |
msgid "Nonce failed"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
52 |
msgid "Invalid action"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
56 |
msgid "Unknown error occured"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
60 |
msgid "Login created successfully!"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
|
|
|
|
|
|
|
|
64 |
msgid "Login deleted successfully!"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
68 |
msgid "Login disabled successfully!"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
72 |
msgid "Login enabled successfully!"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
76 |
msgid "Settings have been updated successfully"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
80 |
msgid "Success!"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
84 |
#, php-format
|
85 |
msgid ""
|
86 |
"If you like <strong>Temporary Login Without Password</strong> plugin, please "
|
87 |
"leave us a %s rating. A huge thanks in advance!"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
91 |
msgid "Thank You :) "
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
95 |
#, php-format
|
96 |
msgid "Thank you for using %s."
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
104 |
-
msgid "
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
108 |
-
msgid "
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
112 |
-
msgid "
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
116 |
msgid "One Week"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
120 |
msgid "One Month"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
124 |
msgid "Custom Date"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
128 |
msgid "No Option Found"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
132 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
133 |
msgid "Expired"
|
134 |
msgstr ""
|
135 |
|
@@ -139,6 +143,7 @@ msgstr ""
|
|
139 |
|
140 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:17
|
141 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:44
|
|
|
142 |
msgid "Role"
|
143 |
msgstr ""
|
144 |
|
@@ -165,22 +170,27 @@ msgstr ""
|
|
165 |
|
166 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:72
|
167 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:34
|
|
|
168 |
msgid "Super Admin"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
172 |
msgid "Reactivate for one day"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
176 |
msgid "Disable"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
180 |
msgid "Delete"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
|
|
|
|
|
|
|
|
184 |
msgid "Copy login link"
|
185 |
msgstr ""
|
186 |
|
@@ -196,19 +206,19 @@ msgstr ""
|
|
196 |
msgid "You don't have permission to access this page"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
200 |
msgid "Create New"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
204 |
msgid "Here's a temporary login link"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
208 |
msgid "Click To Copy"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
212 |
msgid ""
|
213 |
"User can directly login to wordpress admin panel without username and "
|
214 |
"password by opening this link."
|
@@ -223,27 +233,33 @@ msgid "Email*"
|
|
223 |
msgstr ""
|
224 |
|
225 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:15
|
|
|
226 |
msgid "First Name"
|
227 |
msgstr ""
|
228 |
|
229 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:24
|
|
|
230 |
msgid "Last Name"
|
231 |
msgstr ""
|
232 |
|
233 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:38
|
|
|
234 |
msgid "Grant this user super admin privileges for the Network."
|
235 |
msgstr ""
|
236 |
|
237 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:76
|
238 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/temporary_logins_settings.php:30
|
|
|
239 |
msgid "Submit"
|
240 |
msgstr ""
|
241 |
|
242 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:76
|
|
|
243 |
msgid "or"
|
244 |
msgstr ""
|
245 |
|
246 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:77
|
|
|
247 |
msgid "Cancel"
|
248 |
msgstr ""
|
249 |
|
@@ -263,6 +279,18 @@ msgstr ""
|
|
263 |
msgid "Default Role"
|
264 |
msgstr ""
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
#. Name of the plugin
|
267 |
msgid "Temporary Login Without Password"
|
268 |
msgstr ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: PACKAGE VERSION\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2018-02-05 16:55+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"
|
16 |
|
17 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:80
|
18 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:80
|
19 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:13
|
20 |
msgid "Temporary Logins"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:388
|
24 |
msgid "User creation failed"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:392
|
28 |
msgid "You do not have permission to create a temporary login"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:396
|
32 |
msgid "Email already is in use"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:400
|
36 |
msgid "Please enter valid email address. Email field should not be empty"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:404
|
40 |
msgid "Please enter valid email address"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:408
|
44 |
msgid "User you are trying to delete is not temporary"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:412
|
48 |
msgid "Nonce failed"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:416
|
52 |
msgid "Invalid action"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:421
|
56 |
msgid "Unknown error occured"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:429
|
60 |
msgid "Login created successfully!"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:432
|
64 |
+
msgid "Login updated successfully!"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:436
|
68 |
msgid "Login deleted successfully!"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:440
|
72 |
msgid "Login disabled successfully!"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:444
|
76 |
msgid "Login enabled successfully!"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:448
|
80 |
msgid "Settings have been updated successfully"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:453
|
84 |
msgid "Success!"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:509
|
88 |
#, php-format
|
89 |
msgid ""
|
90 |
"If you like <strong>Temporary Login Without Password</strong> plugin, please "
|
91 |
"leave us a %s rating. A huge thanks in advance!"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:509
|
95 |
msgid "Thank You :) "
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:511
|
99 |
#, php-format
|
100 |
msgid "Thank you for using %s."
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:158
|
104 |
+
msgid "One Hour"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:159
|
108 |
+
msgid "Three Hours"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:160
|
112 |
+
msgid "One Day"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:161
|
116 |
+
msgid "Three Days"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:162
|
120 |
msgid "One Week"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:163
|
124 |
msgid "One Month"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:164
|
128 |
msgid "Custom Date"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:173
|
132 |
msgid "No Option Found"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:654
|
136 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:689
|
137 |
msgid "Expired"
|
138 |
msgstr ""
|
139 |
|
143 |
|
144 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:17
|
145 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:44
|
146 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:44
|
147 |
msgid "Role"
|
148 |
msgstr ""
|
149 |
|
170 |
|
171 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:72
|
172 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:34
|
173 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:34
|
174 |
msgid "Super Admin"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:139
|
178 |
msgid "Reactivate for one day"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:141
|
182 |
msgid "Disable"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:144
|
186 |
msgid "Delete"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:145
|
190 |
+
msgid "Edit"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:146
|
194 |
msgid "Copy login link"
|
195 |
msgstr ""
|
196 |
|
206 |
msgid "You don't have permission to access this page"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:14
|
210 |
msgid "Create New"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:35
|
214 |
msgid "Here's a temporary login link"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:38
|
218 |
msgid "Click To Copy"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:42
|
222 |
msgid ""
|
223 |
"User can directly login to wordpress admin panel without username and "
|
224 |
"password by opening this link."
|
233 |
msgstr ""
|
234 |
|
235 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:15
|
236 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:15
|
237 |
msgid "First Name"
|
238 |
msgstr ""
|
239 |
|
240 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:24
|
241 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:24
|
242 |
msgid "Last Name"
|
243 |
msgstr ""
|
244 |
|
245 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:38
|
246 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:38
|
247 |
msgid "Grant this user super admin privileges for the Network."
|
248 |
msgstr ""
|
249 |
|
250 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:76
|
251 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/temporary_logins_settings.php:30
|
252 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:79
|
253 |
msgid "Submit"
|
254 |
msgstr ""
|
255 |
|
256 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:76
|
257 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:79
|
258 |
msgid "or"
|
259 |
msgstr ""
|
260 |
|
261 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:77
|
262 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:80
|
263 |
msgid "Cancel"
|
264 |
msgstr ""
|
265 |
|
279 |
msgid "Default Role"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:1
|
283 |
+
msgid "Update Temporary Login"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:6
|
287 |
+
msgid "Email"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/update_login.php:59
|
291 |
+
msgid "Extend Expiry"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
#. Name of the plugin
|
295 |
msgid "Temporary Login Without Password"
|
296 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: admin login, custom login, customer access, 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, temporary login, user, WordPress Admin, wp-admin, developer account, developer login, developer account, passwordless login, password less login
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.9.2
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -43,62 +43,66 @@ If you like Temporary Login Without Password, please leave a five star review on
|
|
43 |
|
44 |
== Changelog ==
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
- Fixed: Temporary User with 'administrator' role shows as a 'Super Admin' for WordPress single site installtion.
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
|
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
- Update: Restrict Temporary user to delete other users.
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
|
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
- Bug Fixed: Temporary user was able to reset password. Now onwards, they won't be able to reset password.
|
92 |
-
- Added: Now, role of temporary user is downgrade to "none" on deactivation of plugin and change to default on re activation of plugin
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
|
|
|
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
|
|
|
|
|
|
|
4 |
Tags: admin login, custom login, customer access, 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, temporary login, user, WordPress Admin, wp-admin, developer account, developer login, developer account, passwordless login, password less login
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.9.2
|
7 |
+
Stable tag: 1.5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
43 |
|
44 |
== Changelog ==
|
45 |
|
46 |
+
**1.5.3 [02-06-2018]**
|
47 |
|
48 |
+
* Added: Now, admin can change the role and expiry of temporary login
|
|
|
49 |
|
50 |
+
**1.5.2 [01-29-2018]**
|
51 |
|
52 |
+
* Added: Now, admin can select roles from which they want to create a Tempoary Login.
|
53 |
+
* Fixed: Temporary User with 'administrator' role shows as a 'Super Admin' for WordPress single site installation.
|
54 |
|
55 |
+
**1.5.1 [01-19-2018]**
|
56 |
|
57 |
+
* Fixed: Parse error: syntax error, unexpected ‘[‘ (PHP < 5.4)
|
|
|
58 |
|
59 |
+
**1.5 [01-08-2018]**
|
60 |
|
61 |
+
* Added: Now, Temporary Login can be created for WordPress Multisite. Super Admin can create a temporary super admin for multisite
|
62 |
+
* Update: Restrict Temporary user to delete other users.
|
63 |
|
64 |
+
**1.4.6 [11-18-2017]**
|
65 |
|
66 |
+
* Added: Now, admin can set the default role for temporary user from settings panel
|
67 |
|
68 |
+
**1.4.5 [11-13-2017]**
|
69 |
|
70 |
+
* Update: Restrict temporary user to deactivate/delete Temporary Login Without Password plugin
|
71 |
|
72 |
+
**1.4.4 [10-23-2017]**
|
73 |
|
74 |
+
* Bug Fixed: Trying to load scripts from unauthorized sources error.
|
75 |
|
76 |
+
**1.4.3 [08-04-2017]**
|
77 |
|
78 |
+
* Fixed: Localization issue
|
79 |
|
80 |
+
**1.4.2 [06-28-2017]**
|
81 |
|
82 |
+
* Bug Fixed: Uncaught Error: Call to undefined function wc_enqueue_js().
|
83 |
|
84 |
+
**1.4.1 [06-23-2017]**
|
85 |
|
86 |
+
* Added: Now, create a temporary login with custom expiry date.
|
87 |
|
88 |
+
**1.4 [09-07-2016]**
|
89 |
|
90 |
+
* Added: Support for "Theme My Login" plugin. Now, temporary user will be redirected to page which is defined in Theme My Login plugin.
|
|
|
|
|
91 |
|
92 |
+
**1.3 [09-01-2016]**
|
93 |
|
94 |
+
* Bug Fixed: Temporary user is able to login with email address. Now onwards, temporary user is not able to login using username/email and password
|
95 |
+
* Bug Fixed: Temporary user was able to reset password. Now onwards, they won't be able to reset password.
|
96 |
+
* Added: Now, role of temporary user is downgrade to "none" on deactivation of plugin and change to default on re activation of plugin
|
97 |
|
98 |
+
**1.2 [09-01-2016]**
|
99 |
|
100 |
+
* Bug Fixed: Temporary user is able to login with username and password.
|
101 |
|
102 |
+
**1.1 [08-05-2016]**
|
103 |
|
104 |
+
* Bug Fixed: Temporary user redirected to login page instead of admin dashboard after successful login.
|
105 |
+
|
106 |
+
**1.0 [08-04-2016]**
|
107 |
+
|
108 |
+
* Initial Release
|
templates/admin_settings.php
CHANGED
@@ -9,14 +9,24 @@
|
|
9 |
|
10 |
<?php if ( $active_tab == 'home' ) { ?>
|
11 |
<div class="wrap wtlwp-settings-wrap" id="temporary-logins">
|
12 |
-
<h2>
|
13 |
-
|
|
|
14 |
</h2>
|
15 |
<div class="wtlwp-settings">
|
16 |
<!-- Add New Form Start -->
|
17 |
-
|
|
|
18 |
<?php include WTLWP_PLUGIN_DIR . '/templates/new_login.php'; ?>
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
<?php if ( ! empty( $wtlwp_generated_url ) ) { ?>
|
22 |
|
9 |
|
10 |
<?php if ( $active_tab == 'home' ) { ?>
|
11 |
<div class="wrap wtlwp-settings-wrap" id="temporary-logins">
|
12 |
+
<h2>
|
13 |
+
<?php echo __( 'Temporary Logins', 'temporary-login-without-password' ); ?>
|
14 |
+
<span class="page-title-action" id="add-new-wtlwp-form-button"><?php _e( 'Create New', 'temporary-login-without-password' ); ?></span>
|
15 |
</h2>
|
16 |
<div class="wtlwp-settings">
|
17 |
<!-- Add New Form Start -->
|
18 |
+
|
19 |
+
<div class="wrap new-wtlwp-form" id="new-wtlwp-form">
|
20 |
<?php include WTLWP_PLUGIN_DIR . '/templates/new_login.php'; ?>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<?php if($do_update) { ?>
|
24 |
+
|
25 |
+
<div class="wrap update-wtlwp-form" id="update-wtlwp-form">
|
26 |
+
<?php include WTLWP_PLUGIN_DIR . '/templates/update_login.php'; ?>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<?php } ?>
|
30 |
|
31 |
<?php if ( ! empty( $wtlwp_generated_url ) ) { ?>
|
32 |
|
templates/update_login.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h2> <?php echo __( 'Update Temporary Login', 'temporary-login-without-password' ); ?></h2>
|
2 |
+
<form method="post">
|
3 |
+
<table class="form-table wtlwp-form">
|
4 |
+
<tr class="form-field form-required">
|
5 |
+
<th scope="row" class="wtlwp-form-row">
|
6 |
+
<label for="user_email"><?php echo __( 'Email', 'temporary-login-without-password' ); ?> </label>
|
7 |
+
</th>
|
8 |
+
<td>
|
9 |
+
<label for="user_email"><?php echo $temporary_user_data['email']; ?></label>
|
10 |
+
</td>
|
11 |
+
</tr>
|
12 |
+
|
13 |
+
<tr class="form-field form-required">
|
14 |
+
<th scope="row" class="wtlwp-form-row">
|
15 |
+
<label for="user_first_name"><?php echo __( 'First Name', 'temporary-login-without-password' ); ?> </label>
|
16 |
+
</th>
|
17 |
+
<td>
|
18 |
+
<input name="wtlwp_data[user_first_name]" type="text" id="user_first_name" value="<?php echo $temporary_user_data['first_name']; ?>" aria-required="true" maxlength="60" class="wtlwp-form-input"/>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
|
22 |
+
<tr class="form-field form-required">
|
23 |
+
<th scope="row" class="wtlwp-form-row">
|
24 |
+
<label for="user_last_name"><?php echo __( 'Last Name', 'temporary-login-without-password' ); ?> </label>
|
25 |
+
</th>
|
26 |
+
<td>
|
27 |
+
<input name="wtlwp_data[user_last_name]" type="text" id="user_last_name" value="<?php echo $temporary_user_data['last_name']; ?>" aria-required="true" maxlength="60" class="wtlwp-form-input"/>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
|
31 |
+
<?php if ( is_network_admin() ) { ?>
|
32 |
+
<tr class="form-field form-required">
|
33 |
+
<th scope="row" class="wtlwp-form-row">
|
34 |
+
<label for="user_super_admin"><?php echo __( 'Super Admin', 'temporary-login-without-password' ); ?> </label>
|
35 |
+
</th>
|
36 |
+
<td>
|
37 |
+
<input type="checkbox" id="user_super_admin" name="wtlwp_data[super_admin]">
|
38 |
+
<?php echo __( 'Grant this user super admin privileges for the Network.', 'temporary-login-without-password' ); ?>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<?php } else { ?>
|
42 |
+
<tr class="form-field">
|
43 |
+
<th scope="row" class="wtlwp-form-row">
|
44 |
+
<label for="adduser-role"><?php echo __( 'Role', 'temporary-login-without-password' ); ?></label>
|
45 |
+
</th>
|
46 |
+
<td>
|
47 |
+
<select name="wtlwp_data[role]" id="user-role">
|
48 |
+
<?php
|
49 |
+
$role = $temporary_user_data['role'];
|
50 |
+
Wp_Temporary_Login_Without_Password_Common::tlwp_dropdown_roles( $visible_roles, $role );
|
51 |
+
?>
|
52 |
+
</select>
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<?php } ?>
|
56 |
+
|
57 |
+
<tr class="form-field">
|
58 |
+
<th scope="row" class="wtlwp-form-row">
|
59 |
+
<label for="adduser-role"><?php echo __( 'Extend Expiry', 'temporary-login-without-password' ); ?></label>
|
60 |
+
</th>
|
61 |
+
<td>
|
62 |
+
<span id="expiry-date-selection">
|
63 |
+
<select name="wtlwp_data[expiry]" id="user-expiry-time">
|
64 |
+
<?php Wp_Temporary_Login_Without_Password_Common::get_expiry_duration_html('week'); ?>
|
65 |
+
</select>
|
66 |
+
</span>
|
67 |
+
|
68 |
+
<span style="display:none;" id="custom-date-picker">
|
69 |
+
<input type="date" id="datepicker" name="wtlwp_data[custom_date]" value="" class="example-datepicker"/>
|
70 |
+
</span>
|
71 |
+
|
72 |
+
</td>
|
73 |
+
</tr>
|
74 |
+
|
75 |
+
<tr class="form-field">
|
76 |
+
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"></label></th>
|
77 |
+
<td>
|
78 |
+
<p class="submit">
|
79 |
+
<input type="submit" class="button button-primary wtlwp-form-submit-button" value="<?php _e( 'Submit', 'temporary-login-without-password' ); ?>" class="button button-primary" id="generatetemporarylogin" name="generate_temporary_login"> <?php _e( 'or', 'temporary-login-without-password' ); ?>
|
80 |
+
<span class="cancel-update-login-form" id="cancel-update-login-form"><?php _e( 'Cancel', 'temporary-login-without-password' ); ?></span>
|
81 |
+
</p>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<input type="hidden" name="wtlwp_action" value="update" />
|
85 |
+
<input type="hidden" name="wtlwp_data[user_id]" value="<?php echo $user_id; ?>" />
|
86 |
+
<?php wp_nonce_field( 'manage-temporary-login_' . $user_id, 'manage-temporary-login', true, true ); ?>
|
87 |
+
</table>
|
88 |
+
</form>
|
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.
|
7 |
* Author: StoreApps
|
8 |
* Author URI: http://storeapps.org
|
9 |
* Requires at least: 3.3
|
10 |
-
* Tested up to: 4.9.
|
11 |
* License: GPL-2.0+
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
13 |
* Text Domain: temporary-login-without-password
|
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.3
|
7 |
* Author: StoreApps
|
8 |
* Author URI: http://storeapps.org
|
9 |
* Requires at least: 3.3
|
10 |
+
* Tested up to: 4.9.2
|
11 |
* License: GPL-2.0+
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
13 |
* Text Domain: temporary-login-without-password
|