Skip to content

Commit

Permalink
Merge branch 'develop' into fix/765
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Nov 2, 2019
2 parents 6039ab8 + 24fc7aa commit d526249
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Learn more: [https://sitekit.withgoogle.com](https://sitekit.withgoogle.com)

## Contributing

Any kind of contributions to Site Kit by Google are welcome. Head over to the [Contributor Handhook](https://github.com/google/site-kit-wp/wiki) to get started, or directly to the [Engineering set up quickstart](https://github.com/google/site-kit-wp/wiki/Engineering#set-up-site-kit-project) to set up Sit Kit locally. :wink:
Any kind of contributions to Site Kit by Google are welcome. Head over to the [Contributor Handhook](https://github.com/google/site-kit-wp/wiki) to get started, or directly to the [Engineering set up quickstart](https://github.com/google/site-kit-wp/wiki/Engineering#set-up-site-kit-project) to set up Site Kit locally. :wink:

## Requirements

Expand Down
24 changes: 21 additions & 3 deletions includes/Core/Util/Migration_1_0_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Google\Site_Kit\Context;
use Google\Site_Kit\Core\Authentication\Authentication;
use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
use Google\Site_Kit\Core\Authentication\Verification_Tag;
use Google\Site_Kit\Core\Authentication\Credentials;
use Google\Site_Kit\Core\Storage\Encrypted_Options;
use Google\Site_Kit\Core\Storage\Options;
Expand Down Expand Up @@ -116,9 +117,26 @@ private function disconnect_users() {
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
$user_ids = ( new \WP_User_Query(
array(
'fields' => 'id',
'meta_key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
'compare' => 'EXISTS',
'fields' => 'id',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => $key_prefix . Verification_Tag::OPTION,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_PROXY_ACCESS_CODE,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_ERROR_CODE,
'compare' => 'EXISTS',
),
),
)
) )->get_results();

Expand Down
23 changes: 20 additions & 3 deletions includes/Core/Util/Reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,26 @@ private function delete_all_user_metas() {
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
$user_query = new \WP_User_Query(
array(
'fields' => 'id',
'meta_key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
'compare' => 'EXISTS',
'fields' => 'id',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => $key_prefix . Verification_Tag::OPTION,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_PROXY_ACCESS_CODE,
'compare' => 'EXISTS',
),
array(
'key' => $key_prefix . OAuth_Client::OPTION_ERROR_CODE,
'compare' => 'EXISTS',
),
),
)
);

Expand Down

0 comments on commit d526249

Please sign in to comment.