Sorry, we don't support your browser.  Install a modern browser

Make the current WordPress user a variable for the database connection#594

R

Or a more general solution is to provide a hook or filter after the db connection is created, but before it is used. This can then be used to set a variable for the connection with the value being the current wordpress user id.

I solved this issue with a patch in wdt_ajax_actions.php (there because I was using wdt native record editing). See the attached screen shot.

The obvious downside is that I’m going to need to reapply this patch with every version update.

a year ago