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
|
@@ 1701-1708 (lines=8) @@
|
| 1698 |
|
/** |
| 1699 |
|
* Is a given user (or the current user if none is specified) linked to a WordPress.com user? |
| 1700 |
|
*/ |
| 1701 |
|
public static function is_user_connected( $user_id = false ) { |
| 1702 |
|
$user_id = false === $user_id ? get_current_user_id() : absint( $user_id ); |
| 1703 |
|
if ( ! $user_id ) { |
| 1704 |
|
return false; |
| 1705 |
|
} |
| 1706 |
|
|
| 1707 |
|
return (bool) Jetpack_Data::get_access_token( $user_id ); |
| 1708 |
|
} |
| 1709 |
|
|
| 1710 |
|
/** |
| 1711 |
|
* Get the wpcom user data of the current|specified connected user. |