Skip to content

Commit c65dd05

Browse files
authored
Merge pull request #256 from auth0/dev
3.2.14
2 parents 7affdf1 + caace86 commit c65dd05

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

WP_Auth0.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
/**
33
* Plugin Name: PLUGIN_NAME
44
* Description: PLUGIN_DESCRIPTION
5-
* Version: 3.2.13
5+
* Version: 3.2.14
66
* Author: Auth0
77
* Author URI: https://auth0.com
88
*/
9-
109
define( 'WPA0_PLUGIN_FILE', __FILE__ );
1110
define( 'WPA0_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
1211
define( 'WPA0_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
1312
define( 'WPA0_LANG', 'wp-auth0' );
1413
define( 'AUTH0_DB_VERSION', 12 );
15-
define( 'WPA0_VERSION', '3.2.13' );
14+
define( 'WPA0_VERSION', '3.2.14' );
1615

1716
/**
1817
* Main plugin class
@@ -357,6 +356,7 @@ public function deactivate() {
357356
public static function uninstall() {
358357
$a0_options = WP_Auth0_Options::Instance();
359358
$a0_options->delete();
359+
delete_option( 'auth0_db_version' );
360360
}
361361

362362
private function autoloader( $class ) {
@@ -411,15 +411,15 @@ function get_currentauth0userinfo() {
411411
$current_user = wp_get_current_user();
412412

413413
$currentauth0_user = get_auth0userinfo($current_user->ID);
414-
414+
415415
return $currentauth0_user;
416416
}
417417
}
418418

419419
if ( ! function_exists( 'get_currentauth0user' ) ) {
420420
function get_currentauth0user() {
421421

422-
global $wpdb;
422+
global $wpdb;
423423

424424
$current_user = wp_get_current_user();
425425

@@ -437,14 +437,16 @@ function get_currentauth0user() {
437437

438438
if ( ! function_exists( 'get_auth0_curatedBlogName' ) ) {
439439
function get_auth0_curatedBlogName() {
440-
$name = get_bloginfo( 'name' );
441440

442-
$name = preg_replace("/[^A-Za-z0-9 ]/", '', $name);
441+
$name = get_bloginfo( 'name' );
442+
443+
$name = preg_replace("/[^A-Za-z0-9 ]/", '', $name);
444+
$name = preg_replace("/\s+/", ' ', $name);
443445
$name = str_replace(" ", "-", $name);
444446

445447
return $name;
446448
}
447449
}
448450

449451
$a0_plugin = new WP_Auth0();
450-
$a0_plugin->init();
452+
$a0_plugin->init();

lib/WP_Auth0_DBManager.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function install_db() {
8686

8787
if ($options->get('use_lock_10') === null) {
8888

89-
if ( strpos( $cdn_url, '10.' ) !== false ) {
89+
if ( strpos( $cdn_url, '10.' ) === false ) {
9090
$options->set('use_lock_10', false);
9191
} else {
9292
$options->set('use_lock_10', true);
@@ -96,14 +96,14 @@ public function install_db() {
9696

9797
$dict = $options->get('dict');
9898

99-
if (!empty($dict))
99+
if (!empty($dict))
100100
{
101101

102-
if (json_decode($dict) === null)
102+
if (json_decode($dict) === null)
103103
{
104104
$options->set('language', $dict);
105-
}
106-
else
105+
}
106+
else
107107
{
108108
$options->set('language_dictionary', $dict);
109109
}
@@ -116,9 +116,7 @@ public function install_db() {
116116

117117
if ( strpos( $cdn_url, '10.' ) === false ) {
118118
$options->set('use_lock_10', false);
119-
}
120-
else
121-
{
119+
} else {
122120
$options->set('use_lock_10', true);
123121
}
124122

@@ -135,8 +133,7 @@ protected function migrate_users_data() {
135133

136134
$sql = 'SELECT a.*
137135
FROM ' . $wpdb->auth0_user .' a
138-
JOIN ' . $wpdb->users . ' u ON a.wp_id = u.id
139-
ORDER BY a.last_update DESC;';
136+
JOIN ' . $wpdb->users . ' u ON a.wp_id = u.id;';
140137

141138
$userRows = $wpdb->get_results( $sql );
142139

lib/WP_Auth0_Options.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ 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.3/lock.min.js',
65+
'cdn_url' => '//cdn.auth0.com/js/lock/10.7/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,
6969
'primary_color' => '',
70-
70+
7171
'language' => '',
7272
'language_dictionary' => '',
7373

@@ -111,8 +111,8 @@ protected function defaults() {
111111
'password_policy' => 'fair',
112112

113113
'force_https_callback' => false,
114-
115-
'auto_provisioning' => true,
114+
115+
'auto_provisioning' => false,
116116
'default_login_redirection' => home_url(),
117117

118118
'auth0_server_domain' => 'auth0.auth0.com',

templates/initial-setup/connections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
</div>
7070
</div>
71-
<script src="http://cdn.auth0.com/js/lock-8.min.js"></script>
71+
<script src="//cdn.auth0.com/js/lock-8.min.js"></script>
7272
<script type="text/javascript">
7373

7474
document.addEventListener("DOMContentLoaded", function() {

0 commit comments

Comments
 (0)