@@ 5196-5203 (lines=8) @@ | ||
5193 | ); |
|
5194 | ||
5195 | @list( $token_key, $version, $user_id ) = explode( ':', $_GET['token'] ); |
|
5196 | if ( |
|
5197 | empty( $token_key ) |
|
5198 | || |
|
5199 | empty( $version ) || strval( JETPACK__API_VERSION ) !== $version |
|
5200 | ) { |
|
5201 | $this->xmlrpc_verification = new WP_Error( 'malformed_token', 'Malformed token in request', compact( 'signature_details' ) ); |
|
5202 | return $this->xmlrpc_verification; |
|
5203 | } |
|
5204 | ||
5205 | if ( '0' === $user_id ) { |
|
5206 | $token_type = 'blog'; |
|
@@ 5210-5213 (lines=4) @@ | ||
5207 | $user_id = 0; |
|
5208 | } else { |
|
5209 | $token_type = 'user'; |
|
5210 | if ( empty( $user_id ) || ! ctype_digit( $user_id ) ) { |
|
5211 | $this->xmlrpc_verification = new WP_Error( 'malformed_user_id', 'Malformed user_id in request', compact( 'signature_details' ) ); |
|
5212 | return $this->xmlrpc_verification; |
|
5213 | } |
|
5214 | $user_id = (int) $user_id; |
|
5215 | ||
5216 | $user = new WP_User( $user_id ); |