protected function ipMatchesWhitelist()
    {
        $whitelist = $this->getWhitelistedIps();
        // Continue if no whitelist is defined
        if (empty($whitelist)) {
            return false;
        }

        $userIp = $_SERVER['REMOTE_ADDR'];
        if (in_array($userIp, $whitelist)) {
            return true;
        }

        return false;
    }