Skip to content

Commit f019000

Browse files
authored
Merge pull request #242 from auth0/dev
3.2.8
2 parents f7600b1 + b415b07 commit f019000

File tree

7 files changed

+33
-22
lines changed

7 files changed

+33
-22
lines changed

WP_Auth0.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: PLUGIN_NAME
44
* Description: PLUGIN_DESCRIPTION
5-
* Version: 3.2.7
5+
* Version: 3.2.8
66
* Author: Auth0
77
* Author URI: https://auth0.com
88
*/
@@ -12,7 +12,7 @@
1212
define( 'WPA0_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
1313
define( 'WPA0_LANG', 'wp-auth0' );
1414
define( 'AUTH0_DB_VERSION', 11 );
15-
define( 'WPA0_VERSION', '3.2.7' );
15+
define( 'WPA0_VERSION', '3.2.8' );
1616

1717
/**
1818
* Main plugin class

lib/WP_Auth0_Options.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function defaults() {
6262
'passwordless_method' => 'magiclink',
6363
'passwordless_cdn_url' => '//cdn.auth0.com/js/lock-passwordless-2.2.min.js',
6464
'use_lock_10' => null,
65-
'cdn_url' => '//cdn.auth0.com/js/lock/10.0/lock.min.js',
65+
'cdn_url' => '//cdn.auth0.com/js/lock/10.3/lock.min.js',
6666
'cdn_url_legacy' => '//cdn.auth0.com/js/lock-9.2.min.js',
6767
'requires_verified_email' => true,
6868
'wordpress_login_enabled' => true,
@@ -74,7 +74,7 @@ protected function defaults() {
7474
'custom_signup_fields' => '',
7575

7676
'social_big_buttons' => false,
77-
'username_style' => 'username',
77+
'username_style' => '',
7878
'extra_conf' => '',
7979
'remember_last_login' => true,
8080
'custom_css' => '',

lib/admin/WP_Auth0_Admin_Advanced.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,17 +485,23 @@ public function migration_ws_validation( $old_options, $input ) {
485485
$input['migration_token'] = null;
486486
$input['migration_token_id'] = null;
487487

488-
$connection = WP_Auth0_Api_Client::get_connection($input['domain'], $input['auth0_app_token'], $old_options['db_connection_id']);
488+
if (isset($old_options['db_connection_id'])) {
489489

490-
$connection->options->enabledDatabaseCustomization = false;
491-
$connection->options->import_mode = false;
492490

493-
unset($connection->name);
494-
unset($connection->strategy);
495-
unset($connection->id);
491+
$connection = WP_Auth0_Api_Client::get_connection($input['domain'], $input['auth0_app_token'], $old_options['db_connection_id']);
496492

497-
$response = WP_Auth0_Api_Client::update_connection($input['domain'], $input['auth0_app_token'], $old_options['db_connection_id'], $connection);
498-
493+
$connection->options->enabledDatabaseCustomization = false;
494+
$connection->options->import_mode = false;
495+
496+
497+
unset($connection->name);
498+
unset($connection->strategy);
499+
unset($connection->id);
500+
501+
$response = WP_Auth0_Api_Client::update_connection($input['domain'], $input['auth0_app_token'], $old_options['db_connection_id'], $connection);
502+
} else {
503+
$response = false;
504+
}
499505

500506
if ( $response === false ) {
501507
$error = __( 'There was an error disabling your custom database. Check how to do it manually ', WPA0_LANG );
@@ -568,7 +574,7 @@ public function connections_validation( $old_options, $input ) {
568574
$matching = array_intersect($enabled_connections, $check_if_enabled);
569575

570576
if (array_diff($matching, $check_if_enabled) !== array_diff($check_if_enabled, $matching)) {
571-
$error = __( 'The passwordless connection is not enabled. Pleas go to the Auth0 Dashboard and configure it.', WPA0_LANG );
577+
$error = __( 'The passwordless connection is not enabled. Please go to the Auth0 Dashboard and configure it.', WPA0_LANG );
572578
$this->add_validation_error( $error );
573579
}
574580

lib/admin/WP_Auth0_Admin_Appearance.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public function render_custom_js() {
104104
public function render_username_style() {
105105
$v = $this->options->get( 'username_style' );
106106
?>
107+
<input type="radio" name="<?php echo $this->options->get_options_name(); ?>[username_style]" id="wpa0_username_style_auto" value="" <?php echo esc_attr( $v ) == '' ? 'checked="true"' : ''; ?> />
108+
<label for="wpa0_username_style_auto"><?php echo __( 'Auto', WPA0_LANG ); ?></label>
109+
107110
<input type="radio" name="<?php echo $this->options->get_options_name(); ?>[username_style]" id="wpa0_username_style_email" value="email" <?php echo esc_attr( $v ) == 'email' ? 'checked="true"' : ''; ?> />
108111
<label for="wpa0_username_style_email"><?php echo __( 'Email', WPA0_LANG ); ?></label>
109112

@@ -112,7 +115,7 @@ public function render_username_style() {
112115

113116
<div class="subelement">
114117
<span class="description">
115-
<?php echo __( 'If you don\'t want to validate that the user enters an email, just set this to username.', WPA0_LANG ); ?>
118+
<?php echo __( 'If you want to allow the user to use either email or password, set it to Auto.', WPA0_LANG ); ?>
116119
<a target="_blank" href="https://auth0.com/docs/libraries/lock/customization#usernamestyle-string-"><?php echo __( 'More info', WPA0_LANG ); ?></a>
117120
</span>
118121
</div>

lib/admin/WP_Auth0_Admin_Features.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function render_sso() {
5454

5555
<div class="subelement">
5656
<span class="description">
57-
<?php echo __( 'Single Sign On (SSO) allows users to signing once to multiple services. For more details, see our ', WPA0_LANG ); ?>
57+
<?php echo __( 'Single Sign On (SSO) allows users to sign in once to multiple services. For more details, see our ', WPA0_LANG ); ?>
5858
<a target="_blank" href="https://auth0.com/docs/sso/single-sign-on"><?php echo __( 'help page on SSO', WPA0_LANG ); ?></a>.
5959
</span>
6060
</div>

templates/auth0-login-form-lock10.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,14 @@ function a0ShowLoginModal() {
163163
<?php } ?>
164164

165165
if (lock.on) {
166-
lock.on('ready', function(){
167-
if ( lock.options['$client'].subscription === 'free' ) {
168-
jQuery('#attributionBadge').fadeIn();
169-
jQuery(".a0-footer").parent().css('margin-bottom', '50px');
170-
}
171-
});
166+
167+
// lock does not expose client info now
168+
// lock.on('hash_parsed', function(){
169+
// if ( lock.options['$client'].subscription === 'free' ) {
170+
// jQuery('#attributionBadge').fadeIn();
171+
// jQuery(".a0-footer").parent().css('margin-bottom', '50px');
172+
// }
173+
// });
172174

173175
lock.on('error shown', function(){
174176
jQuery(".a0-footer").parent().css('margin-bottom', '50px');

templates/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1><?php _e( 'Auth0 WordPress Plugin Settings', WPA0_LANG ); ?></h1>
99

1010
<div class="row a0-message a0-warning manage">
11-
For your Auth0 dashboard with more settings click <a href="https://manage.auth0.com">here</a>.
11+
For your Auth0 dashboard with more settings click <a target="_blank" href="https://manage.auth0.com">here</a>.
1212
</div>
1313

1414
<?php if ( count( get_settings_errors() ) == 0 && isset( $_GET['settings-updated'] ) ) { ?>

0 commit comments

Comments
 (0)