| @@ -128,9 +128,8 @@ | ||
| 128 | 128 | public function permission_check( WP_REST_Request $request ) { |
| 129 | 129 | $this->request = $request; |
| 130 | 130 | $this->api_key = $this->utils('options')->get( 'api_key' ); |
| 131 | 131 | |
| 132 | - | |
| 133 | 132 | if ( ! empty( $this->api_key ) ) { |
| 134 | 133 | return true; |
| 135 | 134 | } |
| 136 | 135 | |
| @@ -160,13 +159,12 @@ | ||
| 160 | 159 | // Delete user logged meta data |
| 161 | 160 | $this->utils('options') |
| 162 | 161 | ->remove('user') |
| 163 | 162 | ->remove('favourites') |
| 164 | - ->remove('reviews') | |
| 165 | 163 | ->remove('cloud_activity') |
| 166 | 164 | ->remove('api_key'); |
| 167 | 165 | |
| 168 | - if( $this->utils('options')->who_am_i() === 'global' ) { | |
| 166 | + if( $this->utils('options')->whoami() === 'global' ) { | |
| 169 | 167 | $this->utils('options')->remove_global_login(); |
| 170 | 168 | } |
| 171 | 169 | |
| 172 | 170 | return new WP_Error( 'invalid_api_key', $message, $_additional_data ); |