You are here

function homebox_views_pre_execute in Homebox 6

Implementation of hook_views_pre_execute().

Stores the filters in $user->data to ensure that next time $user logs in he will get his filters back

File

./homebox.module, line 780
Home box main file, takes care of global functions settings constants, etc.

Code

function homebox_views_pre_execute(&$view) {
  global $user;

  // Make sure $user is logged in, comes from an Ajax Request for Views
  if ($user->uid != 0 && arg(0) == 'homebox') {
    $exposed =& $_SESSION['views'];

    // We save the current user exposed parameters to the database
    user_save($user, array(
      'homebox_views_exposed' => $exposed,
    ));
  }
}