Environment variables

by Mar 26, 2021Plugin, What’s new?2 comments

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 value in Project Templates
  • In where clauses of publications and projects


  • 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…


  1. Guido


    it would be very nice to be able to use and define custom “environment” variables to create more complex queries. Is this possible or would/will this be possible? I am thinking for example of PHP session variables or a custom array/list of values coming from logic derived from php code snippets.

    • Peter Schulz

      Hi Guido,

      Shortcode parameters allow you to safely add your own custom filter:

      You can use this in combination with the do_shortcode command from your own PHP snippet. Let me know if you are missing functionality. We can always add new features… 🙂

      Hope this helps,


Submit a Comment

Your email address will not be published. Required fields are marked *