/**
  * Checks whether any user is logged in
  *
  * @param bool $onlyLocally if true, only checks locally and does not ask server
  * @return bool
  */
 public function isAnyUserLoggedIn($onlyLocally = false)
 {
     if (!$this->userAccessToken && !$this->getUserAccessTokenFromCache() && !$this->userRefreshToken && !$this->getUserRefreshTokenFromCache()) {
         return false;
     }
     if ($onlyLocally) {
         return true;
     }
     try {
         $this->get('users/ping');
         // if the userAccessToken is not intact after actually talking to the server
         // this means that it fell back to the guest token
         if (!$this->userAccessToken) {
             return false;
         }
         return $this->serviceResponse->getStatusCode() === 200;
     } catch (OAuthUnauthorizedException $e) {
         return false;
     }
 }