You are here

function advuser_filter_set in Advanced User 7.4

TODO.

2 calls to advuser_filter_set()
advuser_filter_get in ./advuser.module
TODO.
advuser_form_user_filter_form_submit in ./advuser.module
Custom submit handler for user_filter_form.
1 string reference to 'advuser_filter_set'
advuser_menu in ./advuser.module
Implements hook_menu().

File

./advuser.module, line 96
advuser.module

Code

function advuser_filter_set($filter_key, $part, $value, $json = FALSE) {
  if (!empty($filter_key)) {
    if (empty($_SESSION['advuser_overview_filter'][$filter_key])) {
      $_SESSION['advuser_overview_filter'][$filter_key] = array(
        'field' => NULL,
        'operator' => NULL,
        'value' => NULL,
      );
    }
    if (empty($part) && empty($value)) {
      unset($_SESSION['advuser_overview_filter'][$filter_key]);
    }
    else {
      $_SESSION['advuser_overview_filter'][$filter_key][$part] = $value;
    }
  }
  if ($json !== FALSE) {
    advuser_filter_get_all(TRUE);
  }
}