Version Description
[01-08-2018] =
- Added: Now, Temporary Login can be created for WordPress Multisite. Super Admin can create a temporary super admin for multisite
- Update: Restrict Temporary user to delete other users.
Download this release
Release Info
Developer | storeapps |
Plugin | Temporary Login Without Password |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.5
- admin/class-wp-temporary-login-without-password-admin.php +62 -6
- includes/class-wp-temporary-login-without-password-common.php +10 -1
- includes/class-wp-temporary-login-without-password-layout.php +10 -6
- includes/class-wp-temporary-login-without-password.php +3 -1
- languages/temporary-login-without-password.pot +61 -44
- public/class-wp-temporary-login-without-password-public.php +2 -1
- readme.txt +21 -12
- templates/admin_settings.php +46 -30
- templates/new_login.php +9 -1
- templates/temporary_logins_settings.php +19 -0
- temporary-login-without-password.php +2 -2
admin/class-wp-temporary-login-without-password-admin.php
CHANGED
@@ -40,9 +40,15 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
40 |
}
|
41 |
|
42 |
public static function admin_settings() {
|
|
|
|
|
43 |
$_template_file = WTLWP_PLUGIN_DIR . '/templates/admin_settings.php';
|
44 |
$wtlwp_generated_url = ! empty( $_REQUEST['wtlwp_generated_url'] ) ? $_REQUEST['wtlwp_generated_url'] : '';
|
45 |
$user_email = ! empty( $_REQUEST['user_email'] ) ? $_REQUEST['user_email'] : '';
|
|
|
|
|
|
|
|
|
46 |
include $_template_file;
|
47 |
}
|
48 |
|
@@ -115,6 +121,39 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
115 |
exit();
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
public static function delete_user() {
|
119 |
|
120 |
if ( (false === Wp_Temporary_Login_Without_Password_Common::can_manage_wtlwp()) || empty( $_REQUEST['wtlwp_action'] ) || ($_REQUEST['wtlwp_action'] != 'delete') || empty( $_REQUEST['user_id'] ) || (absint( $_REQUEST['user_id'] ) == 0) ) {
|
@@ -141,6 +180,18 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
141 |
|
142 |
if ( ! $error ) {
|
143 |
$delete_user = wp_delete_user( absint( $user_id ), get_current_user_id() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
if ( ! is_wp_error( $delete_user ) ) {
|
145 |
$result = array(
|
146 |
'status' => 'success',
|
@@ -282,6 +333,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
282 |
$class = 'error';
|
283 |
} elseif ( $success ) {
|
284 |
$message_type = ! empty( $_REQUEST['wtlwp_message'] ) ? $_REQUEST['wtlwp_message'] : 'default_success_message';
|
|
|
285 |
switch ( $message_type ) {
|
286 |
case 'user_created':
|
287 |
$message = __( 'Login created successfully!', 'temporary-login-without-password' );
|
@@ -299,6 +351,10 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
299 |
$message = __( 'Login enabled successfully!', 'temporary-login-without-password' );
|
300 |
break;
|
301 |
|
|
|
|
|
|
|
|
|
302 |
default:
|
303 |
$message = __( 'Success!', 'temporary-login-without-password' );
|
304 |
break;
|
@@ -354,7 +410,7 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
354 |
|
355 |
// Change the footer text
|
356 |
if ( $can_ask_for_review ) {
|
357 |
-
$footer_text = sprintf( __( 'If you like <strong>Temporary Login Without Password</strong> please leave us a %s rating. A huge thanks in advance!', 'temporary-login-without-password' ), '<a href="https://wordpress.org/support/plugin/temporary-login-without-password/reviews" target="_blank" class="tlwp-rating-link" data-rated="' . esc_attr__( 'Thank You :) ', 'temporary-login-without-password' ) . '">★★★★★</a>' );
|
358 |
} else {
|
359 |
$footer_text = sprintf( __( 'Thank you for using %s.', 'temporary-login-without-password' ), '<a href="https://wordpress.org/plugins/temporary-login-without-password/" target="_blank">Temporary Login Without Password</a>' );
|
360 |
}
|
@@ -390,14 +446,14 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
390 |
$tlwp_rated = get_option( 'tlwp_admin_footer_text_rated', false );
|
391 |
$tlwp_rated_header = get_option( 'tlwp_admin_header_text_rated', false );
|
392 |
|
393 |
-
|
394 |
-
|
395 |
|
396 |
if ( $tlwp_nobug || $tlwp_rated || $tlwp_rated_header || ($total_logins < 3) ) {
|
397 |
return false;
|
398 |
}
|
399 |
|
400 |
-
|
401 |
}
|
402 |
|
403 |
/**
|
@@ -427,11 +483,11 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
427 |
|
428 |
$reviewurl = 'https://wordpress.org/support/plugin/temporary-login-without-password/reviews/';
|
429 |
|
430 |
-
$nobugurl = add_query_arg( 'tlwpnobug', 1, menu_page_url( 'wp-temporary-login-without-password' ) );
|
431 |
|
432 |
echo '<div class="updated">';
|
433 |
|
434 |
-
echo sprintf( __( 'You have been using
|
435 |
|
436 |
echo '</div>';
|
437 |
}
|
40 |
}
|
41 |
|
42 |
public static function admin_settings() {
|
43 |
+
|
44 |
+
$active_tab = ! empty( $_GET['tab'] ) ? $_GET['tab'] : 'home';
|
45 |
$_template_file = WTLWP_PLUGIN_DIR . '/templates/admin_settings.php';
|
46 |
$wtlwp_generated_url = ! empty( $_REQUEST['wtlwp_generated_url'] ) ? $_REQUEST['wtlwp_generated_url'] : '';
|
47 |
$user_email = ! empty( $_REQUEST['user_email'] ) ? $_REQUEST['user_email'] : '';
|
48 |
+
$tlwp_settings = maybe_unserialize( get_option( 'tlwp_settings', array() ) );
|
49 |
+
|
50 |
+
$default_role = ( ! empty( $tlwp_settings ) && isset( $tlwp_settings['default_role'] )) ? $tlwp_settings['default_role'] : 'administrator';
|
51 |
+
|
52 |
include $_template_file;
|
53 |
}
|
54 |
|
121 |
exit();
|
122 |
}
|
123 |
|
124 |
+
public function update_tlwp_settings() {
|
125 |
+
|
126 |
+
if ( empty( $_POST['tlwp_settings_data'] ) || empty( $_POST['wtlwp-nonce'] ) ) {
|
127 |
+
return;
|
128 |
+
}
|
129 |
+
|
130 |
+
$data = $_POST['tlwp_settings_data'];
|
131 |
+
|
132 |
+
$default_role = isset( $data['role'] ) ? $data['role'] : 'administrator';
|
133 |
+
|
134 |
+
$tlwp_settings = [
|
135 |
+
'default_role' => $default_role,
|
136 |
+
];
|
137 |
+
|
138 |
+
$update = update_option( 'tlwp_settings', maybe_serialize( $tlwp_settings ), true );
|
139 |
+
|
140 |
+
$result = array();
|
141 |
+
if ( $update ) {
|
142 |
+
$result = array(
|
143 |
+
'status' => 'success',
|
144 |
+
'message' => 'settings_updated',
|
145 |
+
'tab' => 'settings',
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( empty( $redirect_link ) ) {
|
150 |
+
$redirect_link = Wp_Temporary_Login_Without_Password_Common::get_redirect_link( $result );
|
151 |
+
}
|
152 |
+
|
153 |
+
wp_redirect( $redirect_link, 302 );
|
154 |
+
exit();
|
155 |
+
}
|
156 |
+
|
157 |
public static function delete_user() {
|
158 |
|
159 |
if ( (false === Wp_Temporary_Login_Without_Password_Common::can_manage_wtlwp()) || empty( $_REQUEST['wtlwp_action'] ) || ($_REQUEST['wtlwp_action'] != 'delete') || empty( $_REQUEST['user_id'] ) || (absint( $_REQUEST['user_id'] ) == 0) ) {
|
180 |
|
181 |
if ( ! $error ) {
|
182 |
$delete_user = wp_delete_user( absint( $user_id ), get_current_user_id() );
|
183 |
+
|
184 |
+
// delete user form Multisite network too!
|
185 |
+
if ( is_multisite() ) {
|
186 |
+
|
187 |
+
// If it's a super admin, we can't directly delete user from network site.
|
188 |
+
// We need to revoke super admin access and then delete user
|
189 |
+
if ( is_super_admin( $user_id ) ) {
|
190 |
+
revoke_super_admin( $user_id );
|
191 |
+
}
|
192 |
+
$delete_user = wpmu_delete_user( $user_id );
|
193 |
+
}
|
194 |
+
|
195 |
if ( ! is_wp_error( $delete_user ) ) {
|
196 |
$result = array(
|
197 |
'status' => 'success',
|
333 |
$class = 'error';
|
334 |
} elseif ( $success ) {
|
335 |
$message_type = ! empty( $_REQUEST['wtlwp_message'] ) ? $_REQUEST['wtlwp_message'] : 'default_success_message';
|
336 |
+
$message_type = ! empty( $_REQUEST['wtlwp_message'] ) ? $_REQUEST['wtlwp_message'] : 'default_error_message';
|
337 |
switch ( $message_type ) {
|
338 |
case 'user_created':
|
339 |
$message = __( 'Login created successfully!', 'temporary-login-without-password' );
|
351 |
$message = __( 'Login enabled successfully!', 'temporary-login-without-password' );
|
352 |
break;
|
353 |
|
354 |
+
case 'settings_updated':
|
355 |
+
$message = __( 'Settings have been updated successfully', 'temporary-login-without-password' );
|
356 |
+
break;
|
357 |
+
|
358 |
default:
|
359 |
$message = __( 'Success!', 'temporary-login-without-password' );
|
360 |
break;
|
410 |
|
411 |
// Change the footer text
|
412 |
if ( $can_ask_for_review ) {
|
413 |
+
$footer_text = sprintf( __( 'If you like <strong>Temporary Login Without Password</strong> plugin, please leave us a %s rating. A huge thanks in advance!', 'temporary-login-without-password' ), '<a href="https://wordpress.org/support/plugin/temporary-login-without-password/reviews" target="_blank" class="tlwp-rating-link" data-rated="' . esc_attr__( 'Thank You :) ', 'temporary-login-without-password' ) . '">★★★★★</a>' );
|
414 |
} else {
|
415 |
$footer_text = sprintf( __( 'Thank you for using %s.', 'temporary-login-without-password' ), '<a href="https://wordpress.org/plugins/temporary-login-without-password/" target="_blank">Temporary Login Without Password</a>' );
|
416 |
}
|
446 |
$tlwp_rated = get_option( 'tlwp_admin_footer_text_rated', false );
|
447 |
$tlwp_rated_header = get_option( 'tlwp_admin_header_text_rated', false );
|
448 |
|
449 |
+
$temporary_logins = Wp_Temporary_Login_Without_Password_Common::get_temporary_logins();
|
450 |
+
$total_logins = count( $temporary_logins );
|
451 |
|
452 |
if ( $tlwp_nobug || $tlwp_rated || $tlwp_rated_header || ($total_logins < 3) ) {
|
453 |
return false;
|
454 |
}
|
455 |
|
456 |
+
return true;
|
457 |
}
|
458 |
|
459 |
/**
|
483 |
|
484 |
$reviewurl = 'https://wordpress.org/support/plugin/temporary-login-without-password/reviews/';
|
485 |
|
486 |
+
$nobugurl = add_query_arg( 'tlwpnobug', 1, menu_page_url( 'wp-temporary-login-without-password', false ) );
|
487 |
|
488 |
echo '<div class="updated">';
|
489 |
|
490 |
+
echo sprintf( __( '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>' ), $reviewurl, $nobugurl );
|
491 |
|
492 |
echo '</div>';
|
493 |
}
|
includes/class-wp-temporary-login-without-password-common.php
CHANGED
@@ -40,13 +40,14 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
40 |
$first_name = isset( $data['user_first_name'] ) ? sanitize_text_field( $data['user_first_name'] ) : '';
|
41 |
$last_name = isset( $data['user_last_name'] ) ? sanitize_text_field( $data['user_last_name'] ) : '';
|
42 |
$email = isset( $data['user_email'] ) ? sanitize_email( $data['user_email'] ) : '';
|
|
|
43 |
$user_args = array(
|
44 |
'first_name' => $first_name,
|
45 |
'last_name' => $last_name,
|
46 |
'user_login' => $username,
|
47 |
'user_pass' => $password,
|
48 |
'user_email' => sanitize_email( $email, true ),
|
49 |
-
'role' => $
|
50 |
);
|
51 |
|
52 |
$user_id = wp_insert_user( $user_args );
|
@@ -60,6 +61,10 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
60 |
);
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
63 |
update_user_meta( $user_id, '_wtlwp_user', true );
|
64 |
update_user_meta( $user_id, '_wtlwp_created', Wp_Temporary_Login_Without_Password_Common::get_current_gmt_timestamp() );
|
65 |
update_user_meta( $user_id, '_wtlwp_expire', Wp_Temporary_Login_Without_Password_Common::get_user_expire_time( $expiry_option, $date ) );
|
@@ -248,6 +253,10 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
248 |
$query_string .= '&wtlwp_message=' . $result['message'];
|
249 |
}
|
250 |
|
|
|
|
|
|
|
|
|
251 |
$redirect_link = $base_url . $query_string;
|
252 |
|
253 |
return $redirect_link;
|
40 |
$first_name = isset( $data['user_first_name'] ) ? sanitize_text_field( $data['user_first_name'] ) : '';
|
41 |
$last_name = isset( $data['user_last_name'] ) ? sanitize_text_field( $data['user_last_name'] ) : '';
|
42 |
$email = isset( $data['user_email'] ) ? sanitize_email( $data['user_email'] ) : '';
|
43 |
+
$role = ! empty( $data['role'] ) ? $data['role'] : 'subscriber';
|
44 |
$user_args = array(
|
45 |
'first_name' => $first_name,
|
46 |
'last_name' => $last_name,
|
47 |
'user_login' => $username,
|
48 |
'user_pass' => $password,
|
49 |
'user_email' => sanitize_email( $email, true ),
|
50 |
+
'role' => $role,
|
51 |
);
|
52 |
|
53 |
$user_id = wp_insert_user( $user_args );
|
61 |
);
|
62 |
}
|
63 |
|
64 |
+
if ( is_multisite() && ! empty( $data['super_admin'] ) && $data['super_admin'] === 'on' ) {
|
65 |
+
grant_super_admin( $user_id );
|
66 |
+
}
|
67 |
+
|
68 |
update_user_meta( $user_id, '_wtlwp_user', true );
|
69 |
update_user_meta( $user_id, '_wtlwp_created', Wp_Temporary_Login_Without_Password_Common::get_current_gmt_timestamp() );
|
70 |
update_user_meta( $user_id, '_wtlwp_expire', Wp_Temporary_Login_Without_Password_Common::get_user_expire_time( $expiry_option, $date ) );
|
253 |
$query_string .= '&wtlwp_message=' . $result['message'];
|
254 |
}
|
255 |
|
256 |
+
if ( ! empty( $result['tab'] ) ) {
|
257 |
+
$query_string .= '&tab=' . $result['tab'];
|
258 |
+
}
|
259 |
+
|
260 |
$redirect_link = $base_url . $query_string;
|
261 |
|
262 |
return $redirect_link;
|
includes/class-wp-temporary-login-without-password-layout.php
CHANGED
@@ -49,12 +49,16 @@ class Wp_Temporary_Login_Without_Password_Layout {
|
|
49 |
$wtlwp_status = 'Expired';
|
50 |
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
}
|
60 |
|
49 |
$wtlwp_status = 'Expired';
|
50 |
}
|
51 |
|
52 |
+
if ( is_super_admin( $user->ID ) ) {
|
53 |
+
$user_role = __( 'Super Admin', 'temporary-login-without-password' );
|
54 |
+
} else {
|
55 |
+
$capabilities = $user->{$wpdb->prefix . 'capabilities'};
|
56 |
+
$wp_roles = new WP_Roles();
|
57 |
+
$user_role = '';
|
58 |
+
foreach ( $wp_roles->role_names as $role => $name ) {
|
59 |
+
if ( array_key_exists( $role, $capabilities ) ) {
|
60 |
+
$user_role = $name;
|
61 |
+
}
|
62 |
}
|
63 |
}
|
64 |
|
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.
|
13 |
|
14 |
$this->load_dependencies();
|
15 |
$this->set_locale();
|
@@ -51,7 +51,9 @@ class Wp_Temporary_Login_Without_Password {
|
|
51 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
52 |
|
53 |
$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_menu' );
|
|
|
54 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'create_user' );
|
|
|
55 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'delete_user' );
|
56 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'manage_temporary_login' );
|
57 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tlwp_ask_user_for_review' );
|
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();
|
51 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
52 |
|
53 |
$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_menu' );
|
54 |
+
$this->loader->add_action( 'network_admin_menu', $plugin_admin, 'admin_menu' );
|
55 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'create_user' );
|
56 |
+
$this->loader->add_action( 'admin_init', $plugin_admin, 'update_tlwp_settings' );
|
57 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'delete_user' );
|
58 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'manage_temporary_login' );
|
59 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tlwp_ask_user_for_review' );
|
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:
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
@@ -16,112 +16,115 @@ msgstr ""
|
|
16 |
|
17 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:38
|
18 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:38
|
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 "Success!"
|
77 |
msgstr ""
|
78 |
|
79 |
-
|
80 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:357
|
81 |
#, php-format
|
82 |
msgid ""
|
83 |
-
"If you like <strong>Temporary Login Without Password</strong> please
|
84 |
-
"us a %s rating. A huge thanks in advance!"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
88 |
msgid "Thank You :) "
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:
|
92 |
#, php-format
|
93 |
msgid "Thank you for using %s."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
97 |
msgid "Three Days"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
101 |
msgid "One Day"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
105 |
msgid "Three Hours"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
109 |
msgid "One Hour"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
113 |
msgid "One Week"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
117 |
msgid "One Month"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
121 |
msgid "Custom Date"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:
|
125 |
msgid "Expired"
|
126 |
msgstr ""
|
127 |
|
@@ -130,7 +133,7 @@ msgid "Users"
|
|
130 |
msgstr ""
|
131 |
|
132 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:10
|
133 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:
|
134 |
msgid "Role"
|
135 |
msgstr ""
|
136 |
|
@@ -139,7 +142,7 @@ msgid "Last Logged In"
|
|
139 |
msgstr ""
|
140 |
|
141 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:12
|
142 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:
|
143 |
msgid "Expiry"
|
144 |
msgstr ""
|
145 |
|
@@ -155,19 +158,24 @@ msgstr ""
|
|
155 |
msgid "Not yet logged in"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
|
|
|
|
|
|
|
|
|
|
159 |
msgid "Reactivate for one day"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
163 |
msgid "Disable"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
167 |
msgid "Delete"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:
|
171 |
msgid "Copy login link"
|
172 |
msgstr ""
|
173 |
|
@@ -179,23 +187,23 @@ msgstr ""
|
|
179 |
msgid "Authentication failed"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/public/class-wp-temporary-login-without-password-public.php:
|
183 |
msgid "You don't have permission to access this page"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
187 |
msgid "Create New"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
191 |
msgid "Here's a temporary login link"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
195 |
msgid "Click To Copy"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:
|
199 |
msgid ""
|
200 |
"User can directly login to wordpress admin panel without username and "
|
201 |
"password by opening this link."
|
@@ -217,18 +225,27 @@ msgstr ""
|
|
217 |
msgid "Last Name"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:
|
|
|
221 |
msgid "Submit"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:
|
225 |
msgid "or"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:
|
229 |
msgid "Cancel"
|
230 |
msgstr ""
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
#. Name of the plugin
|
233 |
msgid "Temporary Login Without Password"
|
234 |
msgstr ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: PACKAGE VERSION\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2018-01-06 11:01+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:38
|
18 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:38
|
19 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:10
|
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:303
|
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:307
|
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:311
|
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:315
|
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:319
|
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:323
|
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:327
|
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:331
|
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:336
|
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:345
|
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:349
|
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:353
|
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:357
|
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:361
|
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:365
|
80 |
msgid "Success!"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/admin/class-wp-temporary-login-without-password-admin.php:419
|
|
|
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:419
|
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:421
|
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:87
|
100 |
msgid "Three Days"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:88
|
104 |
msgid "One Day"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:89
|
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:90
|
112 |
msgid "One Hour"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-common.php:91
|
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:92
|
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:93
|
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:456
|
128 |
msgid "Expired"
|
129 |
msgstr ""
|
130 |
|
133 |
msgstr ""
|
134 |
|
135 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:10
|
136 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:26
|
137 |
msgid "Role"
|
138 |
msgstr ""
|
139 |
|
142 |
msgstr ""
|
143 |
|
144 |
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:12
|
145 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:35
|
146 |
msgid "Expiry"
|
147 |
msgstr ""
|
148 |
|
158 |
msgid "Not yet logged in"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:53
|
162 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:21
|
163 |
+
msgid "Super Admin"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:111
|
167 |
msgid "Reactivate for one day"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:113
|
171 |
msgid "Disable"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:116
|
175 |
msgid "Delete"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/includes/class-wp-temporary-login-without-password-layout.php:117
|
179 |
msgid "Copy login link"
|
180 |
msgstr ""
|
181 |
|
187 |
msgid "Authentication failed"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/public/class-wp-temporary-login-without-password-public.php:75
|
191 |
msgid "You don't have permission to access this page"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:10
|
195 |
msgid "Create New"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:20
|
199 |
msgid "Here's a temporary login link"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:22
|
203 |
msgid "Click To Copy"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/admin_settings.php:25
|
207 |
msgid ""
|
208 |
"User can directly login to wordpress admin panel without username and "
|
209 |
"password by opening this link."
|
225 |
msgid "Last Name"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:52
|
229 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/temporary_logins_settings.php:14
|
230 |
msgid "Submit"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:52
|
234 |
msgid "or"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/new_login.php:52
|
238 |
msgid "Cancel"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/temporary_logins_settings.php:1
|
242 |
+
msgid "Temporary Login Settings"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: ../../../../../repositories/GitLab/store-apps/temporary-login-without-password/templates/temporary_logins_settings.php:5
|
246 |
+
msgid "Default Role"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
#. Name of the plugin
|
250 |
msgid "Temporary Login Without Password"
|
251 |
msgstr ""
|
public/class-wp-temporary-login-without-password-public.php
CHANGED
@@ -70,7 +70,8 @@ class Wp_Temporary_Login_Without_Password_Public {
|
|
70 |
global $pagenow;
|
71 |
$bloked_pages = Wp_Temporary_Login_Without_Password_Common::get_blocked_pages();
|
72 |
$page = ! empty( $_GET['page'] ) ? $_GET['page'] : '';
|
73 |
-
|
|
|
74 |
wp_die( __( "You don't have permission to access this page", 'temporary-login-without-password' ) );
|
75 |
}
|
76 |
}
|
70 |
global $pagenow;
|
71 |
$bloked_pages = Wp_Temporary_Login_Without_Password_Common::get_blocked_pages();
|
72 |
$page = ! empty( $_GET['page'] ) ? $_GET['page'] : '';
|
73 |
+
|
74 |
+
if ( ! empty( $page ) && in_array( $page, $bloked_pages ) || ( ! empty( $pagenow ) && (in_array( $pagenow, $bloked_pages ) ) ) || ( ! empty( $pagenow ) && ($pagenow === 'users.php' && isset($_GET['action']) && ( $_GET['action'] === 'deleteuser' || $_GET['action'] === 'delete' ) )) ) {
|
75 |
wp_die( __( "You don't have permission to access this page", 'temporary-login-without-password' ) );
|
76 |
}
|
77 |
}
|
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: 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.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -40,44 +40,53 @@ If you like Temporary Login Without Password, please leave a five star review on
|
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
-
= 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
- Update: Restrict temporary user to deactivate/delete Temporary Login Without Password plugin
|
46 |
|
47 |
-
= 1.4.4 =
|
48 |
|
49 |
- Bug Fixed: Trying to load scripts from unauthorized sources error.
|
50 |
|
51 |
-
= 1.4.3 =
|
52 |
|
53 |
- Fixed: Localization issue
|
54 |
|
55 |
-
= 1.4.2 =
|
56 |
|
57 |
- Bug Fixed: Uncaught Error: Call to undefined function wc_enqueue_js().
|
58 |
|
59 |
-
= 1.4.1 =
|
60 |
|
61 |
- Added: Now, create a temporary login with custom expiry date.
|
62 |
|
63 |
-
= 1.4 =
|
64 |
|
65 |
- Added: Support for "Theme My Login" plugin. Now, temporary user will be redirected to page which is defined in Theme My Login plugin.
|
66 |
|
67 |
-
= 1.3 =
|
68 |
|
69 |
- 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
|
70 |
- Bug Fixed: Temporary user was able to reset password. Now onwards, they won't be able to reset password.
|
71 |
- Added: Now, role of temporary user is downgrade to "none" on deactivation of plugin and change to default on re activation of plugin
|
72 |
|
73 |
-
= 1.2 =
|
74 |
|
75 |
- Bug Fixed: Temporary user is able to login with username and password.
|
76 |
|
77 |
-
= 1.1 =
|
78 |
|
79 |
- Bug Fixed: Temporary user redirected to login page instead of admin dashboard after successful login.
|
80 |
|
81 |
-
= 1.0 =
|
82 |
|
83 |
- Initial Release
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
|
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.1
|
7 |
+
Stable tag: 1.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 1.5 [01-08-2018] =
|
44 |
+
|
45 |
+
- Added: Now, Temporary Login can be created for WordPress Multisite. Super Admin can create a temporary super admin for multisite
|
46 |
+
- Update: Restrict Temporary user to delete other users.
|
47 |
+
|
48 |
+
= 1.4.6 [11-18-2017] =
|
49 |
+
|
50 |
+
- Added: Now, admin can set the default role for temporary user from settings panel
|
51 |
+
|
52 |
+
= 1.4.5 [11-13-2017] =
|
53 |
|
54 |
- Update: Restrict temporary user to deactivate/delete Temporary Login Without Password plugin
|
55 |
|
56 |
+
= 1.4.4 [10-23-2017] =
|
57 |
|
58 |
- Bug Fixed: Trying to load scripts from unauthorized sources error.
|
59 |
|
60 |
+
= 1.4.3 [08-04-2017] =
|
61 |
|
62 |
- Fixed: Localization issue
|
63 |
|
64 |
+
= 1.4.2 [06-28-2017] =
|
65 |
|
66 |
- Bug Fixed: Uncaught Error: Call to undefined function wc_enqueue_js().
|
67 |
|
68 |
+
= 1.4.1 [06-23-2017] =
|
69 |
|
70 |
- Added: Now, create a temporary login with custom expiry date.
|
71 |
|
72 |
+
= 1.4 [09-07-2016] =
|
73 |
|
74 |
- Added: Support for "Theme My Login" plugin. Now, temporary user will be redirected to page which is defined in Theme My Login plugin.
|
75 |
|
76 |
+
= 1.3 [09-01-2016] =
|
77 |
|
78 |
- 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
|
79 |
- Bug Fixed: Temporary user was able to reset password. Now onwards, they won't be able to reset password.
|
80 |
- Added: Now, role of temporary user is downgrade to "none" on deactivation of plugin and change to default on re activation of plugin
|
81 |
|
82 |
+
= 1.2 [09-01-2016] =
|
83 |
|
84 |
- Bug Fixed: Temporary user is able to login with username and password.
|
85 |
|
86 |
+
= 1.1 [08-05-2016] =
|
87 |
|
88 |
- Bug Fixed: Temporary user redirected to login page instead of admin dashboard after successful login.
|
89 |
|
90 |
+
= 1.0 [08-04-2016] =
|
91 |
|
92 |
- Initial Release
|
templates/admin_settings.php
CHANGED
@@ -1,34 +1,50 @@
|
|
1 |
<?php ?>
|
2 |
-
<
|
3 |
-
<
|
4 |
-
<
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
<?php
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
if ( ! empty( $user_email ) ) {
|
19 |
-
echo __( sprintf( " <a href='mailto:%s'>Email</a> copied login link to user.", $user_email ), 'temporary-login-without-password' );
|
20 |
-
}
|
21 |
-
?>
|
22 |
-
</p>
|
23 |
-
|
24 |
-
</div>
|
25 |
-
<?php } ?>
|
26 |
-
<!-- Add New Form End -->
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</div>
|
32 |
-
<!-- List All Generated Logins End -->
|
33 |
</div>
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php ?>
|
2 |
+
<h2 class="nav-tab-wrapper">
|
3 |
+
<a href="<?php echo admin_url( 'users.php?page=wp-temporary-login-without-password&tab=home' ); ?>" class="nav-tab <?php echo $active_tab == 'home' ? 'nav-tab-active' : ''; ?>" >Temporary Logins</a>
|
4 |
+
<a href="<?php echo admin_url( 'users.php?page=wp-temporary-login-without-password&tab=settings' ); ?>" class="nav-tab <?php echo $active_tab == 'settings' ? 'nav-tab-active' : ''; ?>" >Settings</a>
|
5 |
+
</h2>
|
6 |
+
|
7 |
+
|
8 |
+
<?php if ( $active_tab == 'home' ) { ?>
|
9 |
+
<div class="wrap wtlwp-settings-wrap" id="temporary-logins">
|
10 |
+
<h2> <?php echo __( 'Temporary Logins', 'temporary-login-without-password' ); ?> <span class="page-title-action" id="add-new-wtlwp-form-button"><?php _e( 'Create New', 'temporary-login-without-password' ); ?></span> </h2>
|
11 |
+
<div class="wtlwp-settings">
|
12 |
+
<!-- Add New Form Start -->
|
13 |
+
<div class="wrap new-wtlwp-form" id="new-wtlwp-form">
|
14 |
+
<?php include WTLWP_PLUGIN_DIR . '/templates/new_login.php'; ?>
|
15 |
+
</div>
|
16 |
+
|
17 |
+
<?php if ( ! empty( $wtlwp_generated_url ) ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
<div class="wrap generated-wtlwp-login-link" id="generated-wtlwp-login-link">
|
20 |
+
<p><?php _e( "Here's a temporary login link", 'temporary-login-without-password' ); ?></p>
|
21 |
+
<input id="wtlwp-click-to-copy-btn" type="text" class="wtlwp-wide-input" value="<?php echo $wtlwp_generated_url; ?>">
|
22 |
+
<button class="wtlwp-click-to-copy-btn" data-clipboard-action="copy" data-clipboard-target="#wtlwp-click-to-copy-btn"><?php echo __( 'Click To Copy', 'temporary-login-without-password' ); ?></button>
|
23 |
+
<span id="copied-text-message-wtlwp-click-to-copy-btn"></span>
|
24 |
+
<p><?php
|
25 |
+
_e( 'User can directly login to wordpress admin panel without username and password by opening this link.', 'temporary-login-without-password' );
|
26 |
+
if ( ! empty( $user_email ) ) {
|
27 |
+
echo __( sprintf( " <a href='mailto:%s'>Email</a> copied login link to user.", $user_email ), 'temporary-login-without-password' );
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
</p>
|
31 |
+
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
+
<!-- Add New Form End -->
|
35 |
+
|
36 |
+
<!-- List All Generated Logins Start -->
|
37 |
+
<div class="wrap list-wtlwp-logins" id="list-wtlwp-logins">
|
38 |
+
<?php load_template( WTLWP_PLUGIN_DIR . '/templates/list_temporary_logins.php' ); ?>
|
39 |
+
</div>
|
40 |
+
<!-- List All Generated Logins End -->
|
41 |
</div>
|
|
|
42 |
</div>
|
43 |
+
<?php } elseif ( $active_tab == 'settings' ) { ?>
|
44 |
+
|
45 |
+
<div class="wrap list-wtlwp-logins" id="wtlwp-logins-settings">
|
46 |
+
<?php include WTLWP_PLUGIN_DIR . '/templates/temporary_logins_settings.php' ?>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<?php }// End if().
|
50 |
+
?>
|
templates/new_login.php
CHANGED
@@ -15,13 +15,21 @@
|
|
15 |
<th scope="row" class="wtlwp-form-row"> <label for="user_last_name"><?php echo __( 'Last Name', 'temporary-login-without-password' ); ?> </label></th>
|
16 |
<td><input name="wtlwp_data[user_last_name]" type="text" id="user_last_name" value="" aria-required="true" autocapitalize="none" autocorrect="off" maxlength="60" class="wtlwp-form-input"/></td>
|
17 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<tr class="form-field">
|
19 |
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"><?php echo __( 'Role', 'temporary-login-without-password' ); ?></label></th>
|
20 |
<td><select name="wtlwp_data[role]" id="user-role">
|
21 |
-
<?php wp_dropdown_roles(
|
22 |
</select>
|
23 |
</td>
|
24 |
</tr>
|
|
|
25 |
|
26 |
<tr class="form-field">
|
27 |
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"><?php echo __( 'Expiry', 'temporary-login-without-password' ); ?></label></th>
|
15 |
<th scope="row" class="wtlwp-form-row"> <label for="user_last_name"><?php echo __( 'Last Name', 'temporary-login-without-password' ); ?> </label></th>
|
16 |
<td><input name="wtlwp_data[user_last_name]" type="text" id="user_last_name" value="" aria-required="true" autocapitalize="none" autocorrect="off" maxlength="60" class="wtlwp-form-input"/></td>
|
17 |
</tr>
|
18 |
+
|
19 |
+
<?php if ( is_network_admin() ) { ?>
|
20 |
+
<tr class="form-field form-required">
|
21 |
+
<th scope="row" class="wtlwp-form-row"> <label for="user_super_admin"><?php echo __( 'Super Admin', 'temporary-login-without-password' ); ?> </label></th>
|
22 |
+
<td><input type="checkbox" id="user_super_admin" name="wtlwp_data[super_admin]"> Grant this user super admin privileges for the Network. </td>
|
23 |
+
</tr>
|
24 |
+
<?php } else { ?>
|
25 |
<tr class="form-field">
|
26 |
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"><?php echo __( 'Role', 'temporary-login-without-password' ); ?></label></th>
|
27 |
<td><select name="wtlwp_data[role]" id="user-role">
|
28 |
+
<?php wp_dropdown_roles( $default_role ); ?>
|
29 |
</select>
|
30 |
</td>
|
31 |
</tr>
|
32 |
+
<?php } ?>
|
33 |
|
34 |
<tr class="form-field">
|
35 |
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"><?php echo __( 'Expiry', 'temporary-login-without-password' ); ?></label></th>
|
templates/temporary_logins_settings.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h2> <?php echo __( 'Temporary Login Settings', 'temporary-login-without-password' ); ?></h2>
|
2 |
+
<form method="post">
|
3 |
+
<table class="form-table wtlwp-form">
|
4 |
+
<tr class="form-field">
|
5 |
+
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"><?php echo __( 'Default Role', 'temporary-login-without-password' ); ?></label></th>
|
6 |
+
<td><select name="tlwp_settings_data[role]" id="user-role">
|
7 |
+
<?php wp_dropdown_roles( $default_role ); ?>
|
8 |
+
</select>
|
9 |
+
</td>
|
10 |
+
</tr>
|
11 |
+
|
12 |
+
<tr class="form-field">
|
13 |
+
<th scope="row" class="wtlwp-form-row"><label for="adduser-role"></label></th>
|
14 |
+
<td><p class="submit"><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"></p>
|
15 |
+
</td>
|
16 |
+
</tr>
|
17 |
+
<?php wp_nonce_field( 'wtlwp_generate_login_url', 'wtlwp-nonce', true, true ); ?>
|
18 |
+
</table>
|
19 |
+
</form>
|
temporary-login-without-password.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
* Plugin Name: Temporary Login Without Password
|
5 |
* Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
|
6 |
* 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.
|
7 |
-
* Version: 1.
|
8 |
* Author: StoreApps
|
9 |
* Author URI: http://storeapps.org
|
10 |
* Requires at least: 3.3
|
11 |
-
* Tested up to: 4.
|
12 |
* License: GPL-2.0+
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
14 |
* Text Domain: temporary-login-without-password
|
4 |
* Plugin Name: Temporary Login Without Password
|
5 |
* Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
|
6 |
* 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.
|
7 |
+
* Version: 1.5
|
8 |
* Author: StoreApps
|
9 |
* Author URI: http://storeapps.org
|
10 |
* Requires at least: 3.3
|
11 |
+
* Tested up to: 4.9.1
|
12 |
* License: GPL-2.0+
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
14 |
* Text Domain: temporary-login-without-password
|