Skip to content

Commit 95d7ead

Browse files
authored
Merge pull request #243 from auth0/dev
Dev
2 parents f019000 + b7ba011 commit 95d7ead

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

WP_Auth0.php

Lines changed: 3 additions & 3 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.8
5+
* Version: 3.2.9
66
* Author: Auth0
77
* Author URI: https://auth0.com
88
*/
@@ -11,8 +11,8 @@
1111
define( 'WPA0_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
1212
define( 'WPA0_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
1313
define( 'WPA0_LANG', 'wp-auth0' );
14-
define( 'AUTH0_DB_VERSION', 11 );
15-
define( 'WPA0_VERSION', '3.2.8' );
14+
define( 'AUTH0_DB_VERSION', 12 );
15+
define( 'WPA0_VERSION', '3.2.9' );
1616

1717
/**
1818
* Main plugin class

lib/WP_Auth0_DBManager.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ public function install_db() {
4747
if ( strpos( $cdn_url, 'auth0-widget-5' ) !== false || strpos( $cdn_url, 'lock-9.1' ) !== false ) {
4848
$options->set( 'cdn_url', '//cdn.auth0.com/js/lock-9.2.min.js' );
4949
}
50+
if ( strpos( $cdn_url, '10.0' ) !== false ) {
51+
$options->set( 'cdn_url', '//cdn.auth0.com/js/lock/10.3/lock.min.js' );
52+
}
53+
if ( strpos( $cdn_url, '10.1' ) !== false ) {
54+
$options->set( 'cdn_url', '//cdn.auth0.com/js/lock/10.3/lock.min.js' );
55+
}
56+
if ( strpos( $cdn_url, '10.2' ) !== false ) {
57+
$options->set( 'cdn_url', '//cdn.auth0.com/js/lock/10.3/lock.min.js' );
58+
}
5059

5160
if ( $this->current_db_version <= 7 ) {
5261
if ( $options->get( 'db_connection_enabled' ) ) {
@@ -77,7 +86,7 @@ public function install_db() {
7786

7887
if ($options->get('use_lock_10') === null) {
7988

80-
if ( strpos( $cdn_url, '10.0' ) !== false ) {
89+
if ( strpos( $cdn_url, '10.' ) !== false ) {
8190
$options->set('use_lock_10', false);
8291
} else {
8392
$options->set('use_lock_10', true);
@@ -103,9 +112,9 @@ public function install_db() {
103112

104113
}
105114

106-
if ( $this->current_db_version < 11 ) {
115+
if ( $this->current_db_version < 12 ) {
107116

108-
if ( strpos( $cdn_url, '10.0' ) === false ) {
117+
if ( strpos( $cdn_url, '10.' ) === false ) {
109118
$options->set('use_lock_10', false);
110119
}
111120
else

lib/WP_Auth0_UsersRepo.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,13 @@ public function create( $userinfo, $token, $access_token = null, $role = null, $
148148
public function find_auth0_user( $id ) {
149149
global $wpdb;
150150

151-
$users = get_users( array(
151+
$query = array(
152152
'meta_key' => $wpdb->prefix.'auth0_id',
153153
'meta_value' => $id,
154-
'blog_id' => 0)
155-
);
154+
'blog_id' => 0,
155+
);
156+
157+
$users = get_users( $query );
156158

157159
if ( $users instanceof WP_Error ) {
158160
WP_Auth0_ErrorManager::insert_auth0_error( '_find_auth0_user', $userRow );

0 commit comments

Comments
 (0)