if (is_null($ipaddr)) {
            throw new Exception("Cannot log user activity because no remote IP was provided");
        }