security_check_session_saved_exact_data_type_key

 
          security_check_session_saved_exact_data_type_key(string $session_key, string $correct_data_type)  
This is one of the session verification methods that should be used with private reports! This method sets your report to check both the existence of a given session key and its value's data type which should be equal to the "$correct_data_type" 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 .

# Note

This method is deprecated, it will be removed in a subsequent release of Smart Report Engine.

# Parameters

Parameter Description
$session_keyA session key in your project, that you want the engine to check for its existence in session and its value's data type before allowing any access to your private report.
$correct_data_typeSRE_NUMBER, SRE_TEXT or SRE_DATE

# 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")
       ->check_session_saved_exact_data_type_key("user_id", SRE_NUMBER);       
$engine = new CustomEngine($report);
$report_path = $engine->create_report();