← All changes
|
jetpack_vendor/automattic/jetpack-connection/src/sso/class-helpers.php
+3
-2
16.2
→
16.3
View file →
| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | |
| 8 | 8 | namespace Automattic\Jetpack\Connection\SSO; |
| 9 | 9 | |
| 10 | 10 | use Automattic\Jetpack\Connection\SSO; |
| 11 | +use Automattic\Jetpack\Connection\Utils; | |
| 11 | 12 | use Automattic\Jetpack\Constants; |
| 12 | 13 | use Jetpack_IXR_Client; |
| 13 | 14 | |
| 14 | 15 | /** |
| @@ -371,9 +372,9 @@ | ||
| 371 | 372 | * |
| 372 | 373 | * @param int $user_id The local user id. |
| 373 | 374 | */ |
| 374 | 375 | public static function delete_connection_for_user( $user_id ) { |
| 375 | - $wpcom_user_id = get_user_meta( $user_id, 'wpcom_user_id', true ); | |
| 376 | + $wpcom_user_id = Utils::get_wpcom_user_id( $user_id ); | |
| 376 | 377 | if ( ! $wpcom_user_id ) { |
| 377 | 378 | return; |
| 378 | 379 | } |
| 379 | 380 | |
| @@ -388,9 +389,9 @@ | ||
| 388 | 389 | return false; |
| 389 | 390 | } |
| 390 | 391 | |
| 391 | 392 | // Clean up local data stored for SSO. |
| 392 | - delete_user_meta( $user_id, 'wpcom_user_id' ); | |
| 393 | + Utils::delete_wpcom_user_id( $user_id ); | |
| 393 | 394 | delete_user_meta( $user_id, 'wpcom_user_data' ); |
| 394 | 395 | self::clear_wpcom_profile_cookies(); |
| 395 | 396 | |
| 396 | 397 | return $xml->getResponse(); |