Add FILTER CRITERIA in Views Programmatically I want to add/modify a filter criteria programmatically. 

For example, for a view, I added an "Email Address" filter whose value is needed to change dynamically, it is needed to set to the current logged in user's email id. 

How to achieve that? Please see attached image for more details. Please help.
Use the Devel module and dpm($view) and dpm($query) after you put like "test@email.com" into the "value" field found in your pic. See the object/array structure of the view and query from the devel output.

Then use the function hook_views_query_alter(&amp;$view, &amp;$query) in your module to target the WHERE condition filter condition and set it to the value you want.

Something like:

function MYMODULE_views_query_alter(&amp;$view, &amp;$query) {
  global $user;
  dpm($view, __FUNCTION__);
  dpm($query, __FUNCTION__);
  if ($view-&gt;name === 'your_view_machine_name') {
    // This will only work as-is if you always have something in the filter by
    // default, I guess. This hook runs always so you could just put
    // 'test@test.com' as the email to filter by in views and this
    // will always override it. I'm sure there is a cleaner way to put
    // the filter dynamically at runtime. But i think thats more complex
    // php that customizes a view.
    //
    // The index 2 below is the index of the condition for the email filter.
    // Your $query structure may be different in your dpm() of the View $query.
    $query-&gt;where[1]['conditions'][2]['field']['value'] = $user-&gt;email;
  }
}