security_check_session_saved_exact_value_key
security_check_session_saved_exact_value_key
security_check_session_saved_exact_value_key(string $session_key, mixed $correct_value)
Parameter | Description |
---|---|
$session_key | A 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_value | The engine will use this value to validate the value of the session key specified in the first parameter. |
$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;
}