Avoid user_id in the grid?

mygrid.loadXML refers to a php file that loads the data for the grid. I need the user_id in that php file, of course, but I get it from the session variables. Back in the grid logic, it seems a good idea to not include a column in the grid for user_id. I suppose it could be included, but I find myself more comfortable not having it included.
I do not need the user_id in the grid to either delete or update a grid row, because that is done based on the row_id.
However, to add a row in the grid, using mygrid.addRow, I do then need the user_id. But in the php file, I have the user_id because it has been saved as a session variable when the user signed in. So, without pulling user_id from the grid, it is present already in the php file as a session variable. However, it is not included in the render_table array.
My question: How do I pull the user_id from the session variable and insert it into the new row being added?

A little more explanation: In php, I use render_sql for select_mode, but for update, insert, and delete, I use render_table. Now that I am looking at it again, I wonder if my solution is to just simply use render_sql for insert, because I could include the user_id in the sql part of the statement. I have not seen that done in any of the examples. If that is the solution, can you maybe point me to an example?

You may try to to include the user_id as a userdata of the row. it can be accessed on client-side, doesn’t displaying in the grid itself and it sending to the server-side together with the data after the update.
https://docs.dhtmlx.com/grid__userdata.html#userdata

A savvy user could still alert(userdata) and know the user_id. I’m trying to avoid allowing the user_id to be accessible on the client side. I don’t see how that helps me. But maybe I just don’t understand it.

Anyway, if that user_id is on a client-side the user is able to access it.