packages/connection/src/Manager.php 1 location
|
@@ 62-69 (lines=8) @@
|
59 |
|
* @param Integer|Boolean $user_id the user identifier. |
60 |
|
* @return Boolean is the user connected? |
61 |
|
*/ |
62 |
|
public function is_user_connected( $user_id = false ) { |
63 |
|
$user_id = false === $user_id ? get_current_user_id() : absint( $user_id ); |
64 |
|
if ( ! $user_id ) { |
65 |
|
return false; |
66 |
|
} |
67 |
|
|
68 |
|
return (bool) $this->get_access_token( $user_id ); |
69 |
|
} |
70 |
|
|
71 |
|
/** |
72 |
|
* Get the wpcom user data of the current|specified connected user. |
class.jetpack.php 1 location
|
@@ 1702-1709 (lines=8) @@
|
1699 |
|
/** |
1700 |
|
* Is a given user (or the current user if none is specified) linked to a WordPress.com user? |
1701 |
|
*/ |
1702 |
|
public static function is_user_connected( $user_id = false ) { |
1703 |
|
$user_id = false === $user_id ? get_current_user_id() : absint( $user_id ); |
1704 |
|
if ( ! $user_id ) { |
1705 |
|
return false; |
1706 |
|
} |
1707 |
|
|
1708 |
|
return (bool) Jetpack_Data::get_access_token( $user_id ); |
1709 |
|
} |
1710 |
|
|
1711 |
|
/** |
1712 |
|
* Get the wpcom user data of the current|specified connected user. |