check_session_saved_client_agent_key

 
          check_session_saved_client_agent_key(string $session_client_agent_key)  
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 active user's user agent, which should be obtained using the PHP variable $_SERVER['HTTP_USER_AGENT']. 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 to be equal to the user agent (i.e $_SERVER["HTTP_USER_AGENT"] ) before allowing 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")
       ->check_session_saved_client_agent_key("user_agent");
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
if ($report_path) {
 echo "Your report URL:" . $report_path;
}