diff --git a/crm/export-csv.php b/crm/export-csv.php index db736822..9ae9acae 100644 --- a/crm/export-csv.php +++ b/crm/export-csv.php @@ -26,6 +26,10 @@ // Bootstrap the site require_once('include/crm.inc.php'); +if (!user_id()) { + die ("ERROR: User not logged in"); +} + header('Content-type: text/csv'); header('Content-Disposition: attachment; filename="export.csv"'); print theme('table_csv', $_GET['name'], json_decode($_GET['opts'], true));