I have a table with username column.
I would like to only filter records according to username, IF userlevel = default. That’s because other userlevels must see all records, not just one userlevel (ex. administrator).I know how to filter according to username, using user id advanced security, but I need that some other users, with different user levels and that are not administrators see all records.Can anyone give me a hand? Thank you
You may simply use “Recordset_Selecting” server event to filter records based on your own criteria.
Please read “Server Events and Client Scripts” topic from PHPMaker Help menu for more info and example.
I’ve searched and found the UserID_Loaded approach and tried it.if (CurrentUserName() == “AA”)
$this->addUserName(“BB”); // Add User ID by user name
}
and for one user it works, the thing is that “AA” should be able to see 3 more users (with the same user level).Is this a good approach or is the recordset a better one?
You will see which one is better after comparing between “Recordset_Selecting” and “UserID_Loaded” server event. Just try it by yourself.