The following environment variables can be used in WP Data Access
$$USERID$$ | WordPress user ID |
$$USER$$ | WordPress user login |
$$EMAIL$$ | WordPress user email |
$$NOW$$ | Current date |
$$NOWDT$$ | Current date + time |
Environment variables can be used
- As default values in Project Templates
- In where clauses of Data Tables and Data Apps
Notes #
- Since version 5.2.3 the WordPress user ID is also available via a session variable for all local and remote database connections. This features allows plugin users to use the WordPress user ID in queries, views, database triggers and stored procedures. Custom values are supported as well and can be added using a hook. Read more…