But with this they can only see thier own students too.
Now I'm trying to make a report (users_Report.php) and it it groups by user_id from the table users.
The report and query look good, but it shows everyones _user_students in the report. I only want to show the current users id. I have the permission in the PHPrunner set for users to only see thier own data, but I guess reports and especially my custom report isn't looking at this.
I tried to add a WHERE clause in the SQL designer but it doesn't let me go any further.
last part of my Query:
`_user_students`.sign_medical, `_user_students`.sign_name FROM users RIGHT OUTER JOIN `_user_students` ON `_user_students`.user_id = users.user_id WHERE users.user_id = ".$_SESSION["UserID"]."
Now I think it has to be done in users_reports_events.php
// Report page: Before SQL query
function BeforeQueryReport(&$strSQL,&$strWhereClause,&$strOrderBy)
{
WHERE users.user_id ".$_SESSION["UserID"]."
//********** Custom code ************
// put your custom code here
} // function BeforeQueryReportDo I add something here? Or is there another setting that I can do for this?
Thanks!
Bob

Sign In
Register
Help
MultiQuote