You are here

class fb_views_handler_filter_profile_tab in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 6.2 fb_views/fb_views_handler_filter_profile_tab.inc \fb_views_handler_filter_profile_tab
  2. 7.3 fb_views/fb_views_handler_filter_profile_tab.inc \fb_views_handler_filter_profile_tab

@file Filter handler for profile tab user.

Requires the mapping created by fb_user.module. @TODO - Does Views have a way to enforce that dependency?

Hierarchy

Expanded class hierarchy of fb_views_handler_filter_profile_tab

1 string reference to 'fb_views_handler_filter_profile_tab'
fb_views_views_data in fb_views/fb_views.module

File

fb_views/fb_views_handler_filter_profile_tab.inc, line 9
Filter handler for profile tab user.

View source
class fb_views_handler_filter_profile_tab extends views_handler_filter_boolean_operator {
  function construct() {
    parent::construct();
    $this->value_value = t('Is profile tab user');
  }
  function query() {
    $fb_app = $GLOBALS['_fb_app'];

    // Set on Canvas and Connect pages.
    $profile_fbu = $_REQUEST['fb_sig_profile_id'];

    // Set by facebook.
    if ($fb_app && $profile_fbu) {

      // @TODO - this code untested since the conversion from authmap to fb_user table.  Does it work?
      $uid = fb_user_get_local_user($profile_fbu, $fb_app);
      if ($uid) {
        $this
          ->ensure_my_table();
        $this->query
          ->add_where(0, $this->table_alias . ".fbu=%d", $profile_fbu);
      }
    }
  }

}

Members