security_check_session_saved_exact_value_key

 
          security_check_session_saved_exact_value_key(string $session_key, mixed $correct_value)  
This is one of the session verification methods that should be used only with private reports! This method configures your report to check both the existence of a given session key and its value which should be equal to the "$correct_value" parameter. 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 .

# Parameters

Parameter Description
$session_keyA session key in your project that you want the engine to check for its existence in the session and its value before allowing any access to your private report.
$correct_valueThe engine will use this value to validate the value of the session key specified in the first parameter.

# 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_exact_value_key("group_id", 5)
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
if ($report_path) {
   echo "Your report URL:" . $report_path;
}