security_check_session_saved_ip_key

 
          security_check_session_saved_ip_key(string $session_ip_key)  
This is one of the session verification methods that should be used only with private reports! It configures your report to check both the existence of a given session key and its value which should be equal to the IP address of the active user. If this session validation fails, the user should be redirected to the login page that you passed to the "security_init" method.
# This method is exclusive to the commercial edition and is not supported in the community edition .

# Note

All session verification methods start with

# Parameters

Parameter Description
$session_ip_keyA session key in your project that you want the engine to make sure it exists and has the IP address of the active user before allowing any access to your private report.

# Returns

This method returns the calling object, so it can be chained with other methods in the ‘ReportOptions’ class

# Code Example

 
           $report = new ReportOptions(SRE_PRIVATE_REPORT);
$report->select_tables(array("items"))
       ->select_all_fields()
       ->security_init("some_login_page_url","some_logout_page_url","project1")
       ->security_check_session_saved_user_key("user_id")
       ->security_check_session_saved_ip_key("user_ip");
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
if ($report_path) {
echo "Your report URL:" . $report_path;
}